- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Cron execution & system time
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
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-2009 09:55 PM
08-20-2009 09:55 PM
For example the cron post 17:00 for it's execution time but the server's date will show it is only 16:00.
I've stopped and started the cron service, triple checked all the timezone parameters which are set properly to Central time for the US.
I've run out of options to check or try to resolve this so any insight that can be shed is most welcome.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2009 10:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2009 10:28 PM
08-20-2009 10:28 PM
Re: Cron execution & system time
date ; date -u
Fri Aug 21 01:33:03 CDT 2009
Fri Aug 21 06:33:03 UTC 2009
Result of echoing timezone variable -
echo $TZ
CST6CDT
Finally, no to my knowledge there have been no timezone adjustments on this server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2009 10:57 PM
08-20-2009 10:57 PM
Re: Cron execution & system time
I just recommend to reboot server if you are free to do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2009 11:36 PM
08-20-2009 11:36 PM
Re: Cron execution & system time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2009 11:36 PM
08-20-2009 11:36 PM
Re: Cron execution & system time
You seem to have your clock correct.
>even though when a date command is executed there is a difference of an hour.
How do you know this?
Did that date include your timezone?
Can you start a cronjob and do the above date and echo commands?
Note that in a cronjob, TZ isn't likely to be set correctly.
>For example the cron post 17:00 for it's execution time but the server's date will show it is only 16:00.
This implies that cron has TZ set to EST5EDT?
>Hakki: I just recommend to reboot server if you are free to do.
It might be just easier to stop and restart cron:
/sbin/init.d/cron stop
/sbin/init.d/cron start
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2009 11:47 PM
08-20-2009 11:47 PM
Re: Cron execution & system time
/sbin/init.d/cron stop
/sbin/init.d/cron start
The date does show the timezone correctly as CDT.
I can create a script to capture what cron believes the TZ and time settings are
At this moment, I have reviewed what the environment has for the timezone and all that I could see is correct. Also this server does not do any time synchronization so that is not a variable that could be causing this.
Thanks once again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2009 04:22 AM
08-21-2009 04:22 AM
Re: Cron execution & system time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2009 05:16 AM
08-21-2009 05:16 AM
Re: Cron execution & system time
Thank you for your assistance. The cron service was getting the default of EDT. While the rest of the environment was CDT.
I'm reviewing the init.d configuration but I believe I have this resolved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2009 04:58 PM
08-21-2009 04:58 PM
Re: Cron execution & system time
My crontab entries set TZ when I start my scripts:
* * * * * export TZ=XX; ...
Or put that in your scripts.