<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cron and timezone in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697682#M843440</link>
    <description>Richard,&lt;BR /&gt;I'm not convinced sourcing the .profile in the &lt;COMMAND&gt; of crontab will help.&lt;BR /&gt;&lt;BR /&gt;This is because &lt;COMMAND&gt; is invoked only *after* the cron daemon decides that it's time to run the job. At the time of deciding, crond will continue to use the Server TZ.&lt;BR /&gt;&lt;BR /&gt;But yes, if &lt;COMMAND&gt; itself uses $TZ, then sourcing the .profile will allow it to use the User's value of $TZ, rather than that of the server.&lt;/COMMAND&gt;&lt;/COMMAND&gt;&lt;/COMMAND&gt;</description>
    <pubDate>Fri, 05 Apr 2002 06:16:31 GMT</pubDate>
    <dc:creator>Deepak Extross</dc:creator>
    <dc:date>2002-04-05T06:16:31Z</dc:date>
    <item>
      <title>Cron and timezone</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697675#M843433</link>
      <description>Is there any possible method of forcing cron to inherit the $TZ of the user that submitted it?&lt;BR /&gt;Thanks for any help.&lt;BR /&gt;TR.a</description>
      <pubDate>Fri, 05 Apr 2002 02:57:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697675#M843433</guid>
      <dc:creator>Tim Rotunda</dc:creator>
      <dc:date>2002-04-05T02:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cron and timezone</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697676#M843434</link>
      <description>Hi there,&lt;BR /&gt;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?&lt;BR /&gt;&lt;BR /&gt;Richard</description>
      <pubDate>Fri, 05 Apr 2002 03:16:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697676#M843434</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2002-04-05T03:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Cron and timezone</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697677#M843435</link>
      <description>I have a server at EST and user environments at PST, CST and EST.  Each environment has a crontab that schedules things according to the local environment and I need these things to get scheduled according to the local environment time not local server time.  Did that make sense?&lt;BR /&gt;TR.a&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Apr 2002 03:25:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697677#M843435</guid>
      <dc:creator>Tim Rotunda</dc:creator>
      <dc:date>2002-04-05T03:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cron and timezone</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697678#M843436</link>
      <description>what happends when you do &lt;BR /&gt;&lt;BR /&gt;echo $TZ&lt;BR /&gt;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?&lt;BR /&gt;&lt;BR /&gt;Richard</description>
      <pubDate>Fri, 05 Apr 2002 03:31:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697678#M843436</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2002-04-05T03:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cron and timezone</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697679#M843437</link>
      <description>Yes, the TZ is set in each .profile.  I understand that cron does not inherit TZ from the user, but I am looking for a way to force it.</description>
      <pubDate>Fri, 05 Apr 2002 03:39:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697679#M843437</guid>
      <dc:creator>Tim Rotunda</dc:creator>
      <dc:date>2002-04-05T03:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Cron and timezone</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697680#M843438</link>
      <description>Hi Tim,&lt;BR /&gt;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. &lt;BR /&gt;&lt;BR /&gt;I did find this in the man pages for crontab:&lt;BR /&gt;&lt;BR /&gt;cron invokes the command from the user's HOME directory with the POSIX&lt;BR /&gt;shell, (/usr/bin/sh).  It runs in the c queue (see queuedefs(4)).&lt;BR /&gt;&lt;BR /&gt;cron supplies a default environment for every shell, defining:&lt;BR /&gt;           HOME=user's-home-directory&lt;BR /&gt;           LOGNAME=user's-login-id&lt;BR /&gt;           PATH=/usr/bin:/usr/sbin:.&lt;BR /&gt;           SHELL=/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;Users who desire to have their .profile executed must explicitly do so in the crontab entry or in a script called by the entry.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;example of script working with a cron job with version 2.03&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1b397b8d1de3d5118ff40090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1b397b8d1de3d5118ff40090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;new version here 2.05&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xea948cc5e03fd6118fff0090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xea948cc5e03fd6118fff0090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Richard</description>
      <pubDate>Fri, 05 Apr 2002 04:14:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697680#M843438</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2002-04-05T04:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Cron and timezone</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697681#M843439</link>
      <description>Ok Tim I found two docs that would helped. I attached them but have not had a chance to test them out. Let me know if it works.&lt;BR /&gt;&lt;BR /&gt;Richard</description>
      <pubDate>Fri, 05 Apr 2002 05:58:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697681#M843439</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2002-04-05T05:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Cron and timezone</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697682#M843440</link>
      <description>Richard,&lt;BR /&gt;I'm not convinced sourcing the .profile in the &lt;COMMAND&gt; of crontab will help.&lt;BR /&gt;&lt;BR /&gt;This is because &lt;COMMAND&gt; is invoked only *after* the cron daemon decides that it's time to run the job. At the time of deciding, crond will continue to use the Server TZ.&lt;BR /&gt;&lt;BR /&gt;But yes, if &lt;COMMAND&gt; itself uses $TZ, then sourcing the .profile will allow it to use the User's value of $TZ, rather than that of the server.&lt;/COMMAND&gt;&lt;/COMMAND&gt;&lt;/COMMAND&gt;</description>
      <pubDate>Fri, 05 Apr 2002 06:16:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697682#M843440</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-04-05T06:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Cron and timezone</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697683#M843441</link>
      <description>In my view cron is run "by the system" which is in EST. cron is kind of just another process and has inherited the TZ when started. What you want is another cron (3 actually) running in PST, CST and EST., which would have been fine if they hadn't read the same crontab...&lt;BR /&gt;I 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.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Tron</description>
      <pubDate>Fri, 05 Apr 2002 06:43:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697683#M843441</guid>
      <dc:creator>Trond Haugen</dc:creator>
      <dc:date>2002-04-05T06:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Cron and timezone</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697684#M843442</link>
      <description>While Clay's caljd.sh is indeed the Holy Grail of all date-related issues, I think it will be overkill in this situation.&lt;BR /&gt;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.</description>
      <pubDate>Fri, 05 Apr 2002 06:51:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697684#M843442</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-04-05T06:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cron and timezone</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697685#M843443</link>
      <description>The "root" of the issue is as Tron pointed out, cron runs and schedules jobs in its own time.  The solution here is to make cron sensitive to the users TZ needs or able to run in multiple environments.  at may be the solution here and seems viable.  Thanks very much!&lt;BR /&gt;TR.a&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Apr 2002 13:09:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697685#M843443</guid>
      <dc:creator>Tim Rotunda</dc:creator>
      <dc:date>2002-04-05T13:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Cron and timezone</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697686#M843444</link>
      <description>Tim,&lt;BR /&gt;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?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;######################&lt;BR /&gt;######################&lt;BR /&gt;&lt;BR /&gt;ER: add timezone field to crontab syntax &lt;BR /&gt; &lt;BR /&gt;Current Path Home  &lt;BR /&gt;Score  : 0 &lt;BR /&gt;Document Type  : SR &lt;BR /&gt;Date  : 1998 Oct 27 &lt;BR /&gt;Description  : ER: add timezone field to crontab syntax &lt;BR /&gt;Document Id  : 5003440131 &lt;BR /&gt;Search String  :  &lt;BR /&gt;&lt;BR /&gt;You may provide feedback on this document &lt;BR /&gt;&lt;BR /&gt;View the printer friendly version of this document &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;--------------------------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;Problem Text&lt;BR /&gt;&lt;BR /&gt;CR# JAGaa52110&lt;BR /&gt;problem&lt;BR /&gt;Cu would like an enhancement to CRON to be able to handle jobs running&lt;BR /&gt;for different timezones on a single machine.&lt;BR /&gt;&lt;BR /&gt;Essentially cu would like to be able to place a timezone entry in the&lt;BR /&gt;crontab file so the times will automatically adjust for a particular&lt;BR /&gt;timezone&lt;BR /&gt;&lt;BR /&gt;eg.  User in Queensland wants to run a job at say 8:00 Queensland time.&lt;BR /&gt;The unix machine is located in NSW which is currently in daylight&lt;BR /&gt;savings and is hence 1 hour behind QLD.&lt;BR /&gt;When the user in Queensland submits the cron job for 8:00 the job will&lt;BR /&gt;be run at 8:00 NSW time and hence will be run an hour late.&lt;BR /&gt;&lt;BR /&gt;Sysadmin wants to be able to put a Timezone entry in the crontab file&lt;BR /&gt;for Queensland that will cause the cron job to be run at an adjusted&lt;BR /&gt;time.&lt;BR /&gt;&lt;BR /&gt;Fix Text&lt;BR /&gt;&lt;BR /&gt;fix&lt;BR /&gt;This defect is under investigation&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Apr 2002 15:27:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-timezone/m-p/2697686#M843444</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2002-04-05T15:27:10Z</dc:date>
    </item>
  </channel>
</rss>

