[VGLUG] set cronjob at day light timezone

28 views
Skip to first unread message

Chandrakant Solanki

unread,
Nov 6, 2012, 1:07:55 AM11/6/12
to vglug
Hi All,

I have some cronjob, which running daily around 12:01 AM on US production machine.

Now, US will follow day light saving time zone, so, how can I configure my cron to execute.

--
Regards,

Chandrakant Solanki

Vishal Joshi

unread,
Nov 6, 2012, 1:22:28 AM11/6/12
to vg...@googlegroups.com

Hello Chandrakant bhai,


On Tue, Nov 6, 2012 at 11:37 AM, Chandrakant Solanki <solanki.c...@gmail.com> wrote:
Hi All,

I have some cronjob, which running daily around 12:01 AM on US production machine.

Now, US will follow day light saving time zone, so, how can I configure my cron to execute.
 
Please see if the below link helps you out.

TZ in Cron


 
--
Regards,

Chandrakant Solanki

--
--
Please read http://www.catb.org/~esr/faqs/smart-questions.html before posting.
You received this message because you are subscribed to the "Vibrant GNU/Linux User Group".
To stop receiving emails from this group, mail to VGLUG+un...@googlegroups.com
To post to this group, send email to VG...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/VGLUG
 
 
 


Best regards,
Vishal Girish Joshi
M: +91-9768797123
Please consider the Environment before printing this e-mail

Rupesh Patel

unread,
Nov 6, 2012, 1:53:13 PM11/6/12
to vg...@googlegroups.com
Hi, Chandrakant

Are you using NTP?

I haven't tested above option (TZ in cron) so not exactly sure about
it but i think it would help after you apply tzdata package. Make sure
when DST follows, you update tzdata package. This package contains
day light saving changes.

Note:-- Just one more thing which i would like to share here, might be
some one has encountered this kind of issue. (RHEL)

Before you patch tzdata, make sure your time zones does not mismatch
"cat /etc/sysconfig/clock" and "strings /etc/localtime".

If both are point to different then you might face production issue
due to suddenly time zone change on server.

Below are just example.

i.e "/etc/sysconfig/clock --> IST
/etc/localtime --> EDT

When you patch tzdata, on installation moments tzdata run binary
/usr/sbin/tzdata-update" which check time zone in both file. If both
mismatch then it directly override time zone. In above case it will
apply IST in /etc/localtime. You can confirm how that happens using
strace to /usr/sbin/tzdata-update.

Thanks,
Rupesh Patel




On 11/6/12, Vishal Joshi <visha...@gmail.com> wrote:
> Hello Chandrakant bhai,
>
> On Tue, Nov 6, 2012 at 11:37 AM, Chandrakant Solanki <
> solanki.c...@gmail.com> wrote:
>
>> Hi All,
>>
>> I have some cronjob, which running daily around 12:01 AM on US production
>> machine.
>>
>> Now, US will follow day light saving time zone, so, how can I configure
>> my
>> cron to execute.
>>
>
> Please see if the below link helps you out.
>
> TZ in Cron <http://forum.webfaction.com/viewtopic.php?id=2559>
>
>
>
>
>> --
>> Regards,
>>
>> Chandrakant Solanki
>>
>> --
>> --
>> Please read http://www.catb.org/~esr/faqs/smart-questions.html before
>> posting.
>> You received this message because you are subscribed to the "Vibrant
>> GNU/Linux User Group".
>> To stop receiving emails from this group, mail to
>> VGLUG+un...@googlegroups.com
>> To post to this group, send email to VG...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/VGLUG
>>
>>
>>
>>
>
>
> Best regards,
> Vishal Girish Joshi
> M: +91-9768797123
> *P**lease consider the Environment before printing this e-mail*
>
> --
> --
> Please read http://www.catb.org/~esr/faqs/smart-questions.html before
> posting.
> You received this message because you are subscribed to the "Vibrant
> GNU/Linux User Group".
> To stop receiving emails from this group, mail to
> VGLUG+un...@googlegroups.com
> To post to this group, send email to VG...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/VGLUG
>
>
>
>


--
Thanks and Regards,
Rupesh Patel
Reply all
Reply to author
Forward
0 new messages