- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cron foo
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 08:01 AM
08-20-2008 08:01 AM
to run on Aug. 26 at 8:00am on the 2nd day
of the week, only. But it ran on Aug. 19 at
8:00am on the second day of the week. Does
anyone see what is wrong with this cron
entry or know of such a thing happening??
0 8 26 8 2
cron log entry on the run:
> root 25836 c Tue Aug 19 08:00:00 CDT 2008
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 08:11 AM
08-20-2008 08:11 AM
Solution"Note that the specification of days can be made in two fields: monthday and weekday. If both are specified in an entry, they are cumulative. For example,
0 0 1,15 * 1 command
runs command at midnight on the first and fifteenth of each month, as well as every Monday."
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 08:14 AM
08-20-2008 08:14 AM
Re: cron foo
Thanks
SKR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 08:32 AM
08-20-2008 08:32 AM
Re: cron foo
this ran on Aug 19 at 8am on the 2nd day
of the week when it was setup to run
Aug 26 at 8am on the 2nd day of the week:
Minute Hour Dayofmonth Monthofyear Dayofweek
0 8 26 8 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 08:40 AM
08-20-2008 08:40 AM
Re: cron foo
It will also run on 26 and on every second day of the week.
Thanks
SKR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 08:43 AM
08-20-2008 08:43 AM
Re: cron foo
"Note that the specification of days can be made in two fields: monthday and weekday. If both are specified in an entry, they are CUMULATIVE. For example,
0 8 26 8 2
runs command at 8:00AM on the twentysixth of each month, as well as EVERY Tuesday."
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 08:51 AM
08-20-2008 08:51 AM
Re: cron foo
The Forum is a funny place. Similar questions are asked within days of one another.
Examine this post's crontab command and my comment of how it is interpreted:
http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1260835
Pete has pointed you to the manpages. They don't lie [at least in this case] :-}
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 08:59 AM
08-20-2008 08:59 AM
Re: cron foo
You are trying to be redundant, by telling cron to run the job on Tuesday Aug. 26. In this case it backfired on you though because cron does NOT do an 'AND' with the day and date fields. You expected it do something like, IF time = 8:00 AM AND today is TUESDAY AND the date is Aug. 26 THEN run your command.
However what cron does:
If time = 8:00 AM AND (today is TUESDAY ***OR*** the date is Aug. 26) THEN run your command.
Hopefully it is clear now?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 09:49 AM
08-20-2008 09:49 AM
Re: cron foo
Better.
0 8 26 8 *
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 08:13 PM
08-20-2008 08:13 PM