Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I want to run cron job every 2 hours In the X minute
Example:
every 2 hours In the 24 minute
00:24
02:24
04:24
etc.
Put your desired minute in the minute column, and then use */2 in the hour column to get it to run every two hours.
24 */2 * * * <your command>
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I am attempting to run a cron job every minute between 7AM and 12PM the expression I am attempting to use is as follows:
*/1 7-24 * * *
which doesn't appear to run correctly. I am fairly new to writing such expressions, could anyone point me in the right direction for what I am trying to achieve
If you mean every minute between 7:00 and 12:00 (12pm, noon), use this:
* 7-12 * * *
If you want every minute between 7:00 and 24:00 (12am, midnight), use this:
* 7 * * *
Other combinations you can try here: crontab guru
First star already means every minute, so there is no need to manipulate this further.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I don't have a box to test a cron job so I am posting it here.
I want to run a job every hour between 6 am to 18:00.This is what I have tried
0 6-18/1 * * * <command>
and
0 6-18 * * * <command>
Which one is the correct way of achieving it
Both should work, but I would probably use the second one.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
Is it possible to write a single cron expression which runs on the 29th day of every month OR the last day if the month has only 28 days (e.g. February)?
Single cron syntax is not possible. You can do last day of the month
0 0 12 L 1/1 ? *.
It will trigger last day of every month.
0 0 12 29 1/1 ? *.
If you trigger like this you will miss non leap year February.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am trying to set up a crontab in linux that runs every 5 minutes
I need to run the following command:
/var/local/orders/ pmtw-print.jar localhost pmtw root itsm
This is what I think I should have but doesn't appear to be working:
5 * * * * java -jar ~/var/local/orders/ pmtw-print.jar localhost pmtw root itsm
Thanks
To run every 5 minutes, use the following. The one you have would run at 5th minute every hour.
*/5 * * * * java -jar ~/var/local/orders/ pmtw-print.jar localhost pmtw root itsm
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have a cronjob set to run as
3 6 10 * 1-6 wget'http://...'
How will this execute ? I intend to run it at 6:03 AM on the 10th Of Every Month expect on Sundays.
I am confused as it ran on Saturday, even when the date was not 10th.
Please advise if there is an error with my command or could it be something else ?
The way you have this setup, your command will execute EITHER when the day of the week is 1-6 OR when the day of month is 10.