- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- crontab - wrong time zone
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
02-09-2005 08:33 AM
02-09-2005 08:33 AM
----------------------------------------------
I have a simple test crontab job
2 16 * * 2,3,4,5,6 ll >/tmp/TIMEZONE.log
This is to run @ 4:02 pm as shown here but, the crontab job here ran Wed Feb 9 13:02:02 PST 2005
ll TIMEZONE.log |cut -b 35-
7429 Feb 9 13:02 TIMEZONE.log
echo $TZ
PST8PDT
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2005 08:54 AM
02-09-2005 08:54 AM
Re: crontab - wrong time zone
Check what's inside /etc/timezone, if that's ok I don't know where else to look.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2005 08:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2005 08:59 AM
02-09-2005 08:59 AM
Re: crontab - wrong time zone
TZ=PST8PDT
export TZ
and I have noticed a /etc/default/tz
cat /etc/default/tz
EST5EDT
would this have an affect?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2005 09:01 AM
02-09-2005 09:01 AM
Re: crontab - wrong time zone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2005 09:07 AM
02-09-2005 09:07 AM
Re: crontab - wrong time zone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2005 10:38 AM
02-09-2005 10:38 AM
Re: crontab - wrong time zone
This procedure should work: Make sure that TZ is set and exported as the current user, root. Now bounce the cron daemon. The bad news is that cron should really never exit so cron shouldn't really be bounced; the really "correct" procedure is to reboot after making certain that /etc/TIMEZONE is valid.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 12:46 PM
02-10-2005 12:46 PM
Re: crontab - wrong time zone
TZ=PST8PDT
export TZ
I still get the same results, I am stumped for now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 01:49 PM
02-10-2005 01:49 PM
Re: crontab - wrong time zone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2005 04:48 AM
02-11-2005 04:48 AM
Re: crontab - wrong time zone
However - the entire server's time was off not just cron.
Not sure if this applies to your situation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2005 05:25 AM
02-11-2005 05:25 AM
Re: crontab - wrong time zone
The tunable for timezone is 420
I looked through the rc script and found the TZ=EST5EDT -- I will change it there and see if that makes a differance.
I will also look at the path and see if there is something that might be changing it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2005 10:10 AM
02-11-2005 10:10 AM
Re: crontab - wrong time zone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2005 11:38 AM
02-11-2005 11:38 AM
Re: crontab - wrong time zone
The Symbolic links are there too...
sbadgett:HAL: /sbin/rc1.d> ll -u |grep cron
lrwxr-xr-x 1 root root 17 Feb 11 16:23 K270cron -> /sbin/init.d/cron
sbadgett:HAL: /sbin/rc1.d> ll -u /sbin/rc2.d |grep cron
lrwxr-xr-x 1 root root 17 Feb 11 16:24 S730cron -> /sbin/init.d/cron
s
We are going to boot the machine again after running "set_parms timezone" and I am not sure this will help since the TIMEZONE file was already set correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2005 04:28 AM
02-14-2005 04:28 AM
Re: crontab - wrong time zone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2005 09:02 AM
02-14-2005 09:02 AM
Re: crontab - wrong time zone
I also do a ps -ef |grep -i cron and oly found the one /usr/sbin/cron running.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2005 12:30 PM
02-14-2005 12:30 PM
Re: crontab - wrong time zone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2005 02:25 PM
02-14-2005 02:25 PM
Re: crontab - wrong time zone
logger -t "$0" -p local1.info "TZ=$TZ"
Now in syslog (after reboot), you can see where TZ changes value.
Bill Hassell, sysadmin