Rundeck: Schedule from from Sunday Morning until Friday Afternoon - cron

I have a Rundeck job that I would like to schedule to run from Sunday at 10 am to Friday at 17:00.
I could create three separate instances of the job and schedule it as below:
#every Sunday starting at 10 until midnight
0 */15 10-23 ? * 1
# every fifteen minutes starting on Monday midnight to Thursday 11:59 am
0 */15 * ? * 2-5 *
#every Friday starting at 12 am until 17:00 pm
0 */15 00-17 ? * 6
But it seems like there has to be a better way that will allow me to do this in one job. Any ideas? Thanks in advance.

The easiest way to do that is with Calendars feature (Enterprise), you can assign each rule to a single job. Take a look at this.

Related

Does Cron have a way to include all except one case

Goal
Create a Cron expression that will run a task at 2 pm and 4 am every day to run a Splunk alert
Except for only run the 2 pm task on Thursday (don't run the task a 4 am on Thursday).
Question
Is this an expression that can be represented in a single expression? (if so how).
Edited:
Agree with Simon, you can configure 2 separate cron schedules:
1st expression(skipping Thursday) - “At minute 0 past hour 4 and 14 on every day-of-week from Monday through Wednesday and every day-of-week from Friday through Sunday.”
0 4,14 * * 1-3,5-7
Cron expression for Thursday:
0 14 * * 4
You can't express that in Cron.
Suggest you go with 2 separate from expressions, both times on all days expect Thursday, and then a separate Cron task just for the 2pm task on Thursday

Cron expression to trigger between time periods

I have requirement to trigger a cron job for every 5 minutes everyday from 06:00 am to 05:45 pm.
I am able to generate expression 0 0/5 06-18 * * ? which triggers every 5 minutes everyday from 06:00 am to 06:59 pm.
Please help me with creating expression which runs every 5 minutes everyday from 06:00 am to 05:45 pm.
Thanks.
You can try this cron expression */5 5-6 1-31 1-12 *
May be this will help you - https://crontab.guru/#/5_6-7_1-31_1-12_

How to setup a cron job that spans the night and runs every 15mins

How to set up a cron job to run from 2300 hrs to 0515 hrs(next morning) from Sunday to Thursday(job ends on Friday morning)
This is a specific requirement since my hostgator server is set to Chicago time and I need a job to run from Monday to Friday Indian Standard Time.
You will need three cron expressions to achieve exactly what you ask for:
23:00 - 23:59 (Sun-Thu, every 15 min)
*/15 23 * * 0-4 command
00:00 - 4:59 (Mon-Fri, every 15 min)
*/15 0-4 * * 1-5 command
5:00, 5:15 (Mon-Fri)
0,15 5 * * 1-5 command
Good luck!

How to set a Cron job in Every one hour from 9:00 am to 6:00 pm ( Monday to Friday )

How to set a Cron job in Every one hour from 9:00 am to 6:00 pm ( Monday to Friday)
I am using Hostgator cron job to send mail every one hour, Now I want it from Monday to Friday. below is the link to screen shot.
http://awesomescreenshot.com/0123cmfxe1
This should work:
0 9-18 * * 1-5 /path_to_script
EDIT:
In the format of the boxes it would be
0
9-18
*
*
1-5

How to skip saturday and sunday in a cron expression?

Hi I want to create a cron expression excluding saturday and sunday.
Begin the line with 0 0 * * 1,2,3,4,5 <user> <command>. The first fields are minutes and hours. In this case the command will run at midnight. The stars mean: for every day of the month, and for every month. The 1 to 5 specify the days. monday to friday. 6=saturday 0=sunday.
Try this:
# run every two hours at the top of the hour Monday through Friday
0 */2 * * mon-fri <command>

Resources