- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Cron and timezone
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
04-04-2002 06:57 PM
04-04-2002 06:57 PM
Thanks for any help.
TR.a
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2002 07:16 PM
04-04-2002 07:16 PM
Re: Cron and timezone
First I am wondering what your objective is? If I am not mistaken the timezone would or should be the time zone where the server sits.What is your end goal?
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2002 07:25 PM
04-04-2002 07:25 PM
Re: Cron and timezone
TR.a
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2002 07:31 PM
04-04-2002 07:31 PM
Re: Cron and timezone
echo $TZ
for each user? Does the time zone come up for each user? I am assuming you are setting the $TZ in the .profile in the home dir right?
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2002 07:39 PM
04-04-2002 07:39 PM
Re: Cron and timezone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2002 08:14 PM
04-04-2002 08:14 PM
Re: Cron and timezone
If I am not mistaken you have your server in EST and users every where else. And you want the user in CST to run his cron jobs at this time. And EST to run his at this time and so on. Well I have been looking and looking and cant find anything about this.
I did find this in the man pages for crontab:
cron invokes the command from the user's HOME directory with the POSIX
shell, (/usr/bin/sh). It runs in the c queue (see queuedefs(4)).
cron supplies a default environment for every shell, defining:
HOME=user's-home-directory
LOGNAME=user's-login-id
PATH=/usr/bin:/usr/sbin:.
SHELL=/usr/bin/sh
Users who desire to have their .profile executed must explicitly do so in the crontab entry or in a script called by the entry.
So here is my 2nd idea. Mr. Clay has a great script called the cal.sh script it is a very famous and I would even go as far as saying legendry for fixing every date and time delema that comes though the forum. So give it a try and let us know what happends. If anything I will bring this post back to the top and see what the day crew has to say. I have become very intrested if cron can do this or not.
example of script working with a cron job with version 2.03
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1b397b8d1de3d5118ff40090279cd0f9,00.html
new version here 2.05
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xea948cc5e03fd6118fff0090279cd0f9,00.html
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2002 09:58 PM
04-04-2002 09:58 PM
Re: Cron and timezone
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2002 10:16 PM
04-04-2002 10:16 PM
Re: Cron and timezone
I'm not convinced sourcing the .profile in the
This is because
But yes, if

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2002 10:43 PM
04-04-2002 10:43 PM
SolutionI do understand (I think) that you want the users to operate in their own time zone but I don't think you can have them run cron jobs in any other than the system TZ. Will it help them to run at-jobs? As they are scheduled from the shell they will be in the users TZ.
Regards,
Tron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2002 10:51 PM
04-04-2002 10:51 PM
Re: Cron and timezone
All that the users need to do is calculate the difference between their local $TZ and the Server's, and adjust the time (HH and MM) accoringly in their crontab files.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2002 05:09 AM
04-05-2002 05:09 AM
Re: Cron and timezone
TR.a
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2002 07:27 AM
04-05-2002 07:27 AM
Re: Cron and timezone
It looks like this is not the first time this has been brought up. Here is a case dated back to 1998 but as you see "This defect is under investigation".I wonder if anything has come of this yet?
######################
######################
ER: add timezone field to crontab syntax
Current Path Home
Score : 0
Document Type : SR
Date : 1998 Oct 27
Description : ER: add timezone field to crontab syntax
Document Id : 5003440131
Search String :
You may provide feedback on this document
View the printer friendly version of this document
--------------------------------------------------------------------------------
Problem Text
CR# JAGaa52110
problem
Cu would like an enhancement to CRON to be able to handle jobs running
for different timezones on a single machine.
Essentially cu would like to be able to place a timezone entry in the
crontab file so the times will automatically adjust for a particular
timezone
eg. User in Queensland wants to run a job at say 8:00 Queensland time.
The unix machine is located in NSW which is currently in daylight
savings and is hence 1 hour behind QLD.
When the user in Queensland submits the cron job for 8:00 the job will
be run at 8:00 NSW time and hence will be run an hour late.
Sysadmin wants to be able to put a Timezone entry in the crontab file
for Queensland that will cause the cron job to be run at an adjusted
time.
Fix Text
fix
This defect is under investigation