views:

44

answers:

2

Hi all,

Is it possible to run my cron job according to the GMT where as, my server is cosidering IST time formats. In future is it possible to use different time zones...? To do this can anyone suggest what all steps i need to follow as i am working on linux.

Thanks in advance....

A: 

You could set up your cron job to run at local time +or- your tz offset so in mycase (US eastern time -5 from GMT) if I want to run a cron job at midnight GMT I would subtract 5 hours from midnight and schedule the job to run at 19:00 hrs.

This will not take into account daylight savings time however.

Steve Robillard
A: 

Unfortunately cron always runs jobs in the server's default local time zone. This is annoying because it may not be what you want.

It would be a useful extension to cron to allow jobs to be scheduled in other time zones, but as far as I know, no normal cron program supports it.

The trick if you're using your own infrastructure is to always set the default time zone to UTC. Always.

MarkR