From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; hahaha-fooled you! This is really Mozilla/5.0 on Linux i686 rv:1.0.1 Gecko/2002103) Description of problem: It should be possible to put timezone settings in a crontab and have cron schedule events according to the specified zone. For example, suppose you wish to scrape a web page during NY hours of 8:30 EST thru 16:00 EST. It is difficult to set a time of day in a crontab when computer is in a different time zone. Either zone might change to/from daylight saving for example (esp where hemispheres are different). Should be able to have a crontab viz: TZ=America/New_York 0 13 * * * date TZ="" # back to local time 0 13 * * * date Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. See above 2. 3. Actual Results: Both evens run at same time - 13:00 localtime. Expected Results: First even should run at 13:00 NY time. Second event should run at 13:00 local time. Additional info: I have a patch. This is more an enhancement than anything else. But it is backward compatable. I have a more detailed explanation of the changes if you email me.
Created attachment 89833 [details] Patch to make crontab TZ settings affect scheduler
You should check the netbsd vixie cron. They have CRON_TZ and CRON_WITHIN both implemented as of April 2002. In the interest of compatibility, it would be nice to see the same environ names kept. I have a bunch of production machines which could use this functionality, so I'll see if I can't come up with a patch, no promises though, this has been backburnered by other issues. cron(8) Add support for CRON_TZ and CRON_WITHIN variables in crontab files. [atatat 20020425] crontab(5) excerpt on netbsd 1.6 " In order to provide finer control over when jobs execute, users can also set the environment variables CRON_TZ and CRON_WITHIN. The CRON_TZ variable can be set to an alter- nate time zone in order to affect when the job is run. Note that this only affects the scheduling of the job, not the time zone that the job perceives when it is run. If CRON_TZ is defined but empty (CRON_TZ=""), jobs are sched- uled with respect to the local time zone. The CRON_WITHIN variable should indicate the number of seconds within a job's scheduled time that it should still be run. On a heavily loaded system, or on a system that has just been "woken up", jobs will sometimes start later than originally intended, and by skipping non-critical jobs because of delays, system load can be lightened. If CRON_WITHIN is defined but empty (CRON_WITHIN="") or set to some non-positive value (0, a negative number, or a non-numeric string), it is treated as if it was unset. "
Sorry for the delay in processing this enhancement request - this one seems to have slipped through the cracks. I agree this could be a useful feature, and will implement it in the next version of cron for Rawhide / FC-5 .
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still running Red Hat Linux, you are strongly advised to upgrade to a current Fedora Core release or Red Hat Enterprise Linux or comparable. Some information on which option may be right for you is available at http://www.redhat.com/rhel/migrate/redhatlinux/. Red Hat apologizes that these issues have not been resolved yet. We do want to make sure that no important bugs slip through the cracks. Please check if this issue is still present in a current Fedora Core release. If so, please change the product and version to match, and check the box indicating that the requested information has been provided. Note that any bug still open against Red Hat Linux on will be closed as 'CANTFIX' on September 30, 2006. Thanks again for your help.
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still running Red Hat Linux, you are strongly advised to upgrade to a current Fedora Core release or Red Hat Enterprise Linux or comparable. Some information on which option may be right for you is available at http://www.redhat.com/rhel/migrate/redhatlinux/. Closing as CANTFIX.