1

my machine is running on PKT and so my crons are also working according to it.

* * * * * date >> /tmp/cronResult 

it gives me time according to my local machine time. I want these crons to run acording to GMT.

how is that possible. I have tried to put

export TZ=GMT

in /etc/default/cron but that doesn't work.

Any help would be appriciated.

2
  • Why can't you just adjust the time in the crontab to account for the local offset from UTC (note GMT doesn't really exist anymore)? PKT is UTC+0500 so if you want something to run at midday UTC schedule it in crontab for 1700.
    – Darren
    Jul 13, 2017 at 12:52
  • i also want it to take care of time saving which can make cron to run one hour earlier or an hour later. i want to know if i can handle it for generic cases.
    – Usama
    Jul 13, 2017 at 14:23

0

You must log in to answer this question.

Browse other questions tagged .