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.
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
What would be the cron expression for "nth second of every minute"?
For example, for every 5th second of every minute, the cron would run at 1:00:05, 1:01:05, 1:02:05 and so on.. 24x7.
I could not find any documentation for achieving this.
Thanks in advance!
This functionality is not available out of the box. What you could do is prepend your command with sleep, so it would be:
sleep 5 && /app/script.sh
Figured it out. The cron expression would be.
5 * 0 ? * *
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
When the last command lists the entries, what is the default format at the duration?For example: if I have an entry with a duration such as (03:43) does that mean that the user was logged on for 3 hours and 43 minutes?
And if there's an entry with a duration such as (3+02:56) does that mean that the user was logged on for 3 days 2 hours and 56 minutes?
Yeah, for every OS I've used, duration: (days+hours:minutes)
Check out this answer
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>
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.