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
Related
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
I have a script that I want to run every 5 minutes for 10 seconds.
*/5 * * * * /root/XXX/cronjobs/add-prod.sh
It seems logical to have another cron job that would run every 5 minutes and 10 seconds
that would turn off the 1st cron job.
Something like this:
[FORMULA HERE] /root/XXX/cronjobs/rem-prod.sh
How can we set a formula for "every 5 minutes and 10 seconds" ?
You can do this via timeout. It will kill the process after 10 seconds. It would be better than killing the process externally. Otherwise, jakob22's answer is the best one.
*/5 * * * * /usr/bin/timeout 10 /root/XXX/cronjobs/add-prod.sh
Edit: This is already featured in a comment.
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
I am having troubles with cron syntax,
I want to run cron job every 10 minutes,but not on 10th minute.
it has to run on 20,30,40,50,00 of the hour, not on 10.
How I do this?
10-59/10 * * * * doesn't work.
Add all times when the Job should be executed
0,20,30,40,50 * * * *
I need to run a cron job on the 3rd minute of every hour, every day.
Here's what I currently have:
3 * * * *
Is that how you correctly do it or would that run it every 3 minutes instead?
That is correct!
If you would like to run a job every third minute you could do like this:
*/3 * * * *