Run airflow on schedule that can't be specified with cron - cron

I have a number of jobs that are currently being scheduled with multiple cron schedules.
For example, I have a job that runs on:
35 9,13,16 * * mon-fri & 40 16 * * mon-fri
I would like to have 1 dag with the schedule, run at 9:35, 13:35, 16:35, 16:40 mon-fri.
Is it possible to do this with airflow/cron?

You can do it with custom timetables https://airflow.apache.org/docs/apache-airflow/stable/howto/timetable.html

Related

Convert a Quartz Scheduler to unix cron scheduler

I have a quick question please, i should convert some Quartz Scheduler to unix machine cron.
The Quartz Scheduler is 0 30 11-18/22 * * ? and when i put it in the site : http://www.cronmaker.com/ it shows me that the cron is running every 11h30 of every day.
So for me 0 30 11-18/22 * * is equals to 0 30 11 * * , is this correct ?
Thank you
For every day run at 11:30 you should rewrite the above Quartz Scheduler like:
30 11 * * * /path/to/the/job

Cron expression for Databricks schedule job

I need to schedule a job in databricks that should run at 6am, 6.15, 6.30, 6.45, 7, 7.15, 7.30, 7.45 and 8am every day.
I am using below expression however it is not running at 8am. Is there anyway we can achieve this?
0 0,15,30,45 06,07 ? * *
This is expected behaviour from cron expression. As per your requirement, you need to write separate cron expression for the 08:00 as follows:
Note that some scheduling requirements are too complicated to express
with a single trigger - such as “every 5 minutes between 9:00 am and
10:00 am, and every 20 minutes between 1:00 pm and 10:00 pm”. The
solution in this scenario is to simply create two triggers, and
register both of them to run the same job.
This will run from 6.00 until 7.45, every 15 minutes:
* 0/15 06-07 * * *
If you want it to run until 08:00 then you have to create two triggers and register both if them to run the same job.
* 0/15 06-07 * * *
* 0 08 * * *
Reference: Databricks uses Quartz Cron triggers. Databricks – Cron Triggers
Hope this helps.
Run twice a day at 10:00 and 18:00
**0 0 10,18/12 * * ?**
http://www.cronmaker.com/;jsessionid=node01kfgs14jy2pa91nxvfa6fs3vnr2008805.node0?0

Is there a way to setup multiple cron jobs but with different schedules for same file?

I have a task which needs to be scheduled for every 15 min from Monday to Friday during Biz hours (UTC time based).
For the same task, I want to reduce the frequency of execution during weekend to 4 hrs.
For this scenario, cron would be:
*/15 00-01,12-23 * * 01-05
* */4 * * 06-07
Is there anyway to have a single cron instead of two separate cron job? Or can I, in any way, append the two cron jobs into a single one?

jenkins cron job schedule

I wasn't sure how to schedule a job to run from 10 PM to 7 AM (the next day). I was thinking if something like below would work
0 22-8 * * *
Thanks

quartz cron to fire every 90 min starting midnight

I want a cron job (or a combination of 2 jobs) which fires at 00:00, 01:30, 03:00 and so on for all day. What can be the most succinct way to write the expression?
you need to split it into 2 jobs since it is an odd frequency
0 0-21/3 * * * command
30 1-22/3 * * * command
Use following cron expression to configure your cron trigger
0 0/30 0,23 * * ?
Also See
Quarts doc

Resources