Computing.Net > Forums > Unix > Cron Job setting from 9th to end of the

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Cron Job setting from 9th to end of the

Reply to Message Icon

Name: Abhishek Rustagi
Date: May 10, 2002 at 11:10:52 Pacific
Comment:


Hi,

I would like to set a cron job from 9th to the
end of the month.

So I did it like:
0 1 9-31 * * echo "Testing CronJob"

But I am not sure what will happen for Febraury and for 30 day months like April,June etc..That is what will happen for 31st which does not exist for these,ie. will my script work on 1st of the next month.

Regards



Sponsored Link
Ads by Google

Response Number 1
Name: Don Arnett
Date: May 10, 2002 at 15:28:00 Pacific
Reply:

From "man 5 crontab" on a linux system:

"Commands are executed by cron(8) when the minute, hour, and month of year fields match the current time, and when at least one of the two day fields (day of month, or day of week) match the current time (see ``Note'' below). Note that this means
that non-existant times, such as "missing hours" during daylight savings conversion, will never match, causing jobs scheduled during the "missing times" not to be run. Similarly, times that occur more than once (again, during daylight savings conversion) will cause matching jobs to be run twice."

I would say that your dates, Feb 30 etc, would fall under the 'missing times' definition mentioned above, and would therefore be skipped


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Cron Job setting from 9th to end of the

Adding variable at end of the row www.computing.net/answers/unix/adding-variable-at-end-of-the-row/7466.html

Inserting a string at the end of a www.computing.net/answers/unix/inserting-a-string-at-the-end-of-a-/6205.html

print columns from files to a file www.computing.net/answers/unix/print-columns-from-files-to-a-file/7615.html