0

AM using ubuntu 16.04 in AWS.

I have changed server time from UTC to Kuwait time, after that date command printing correct time as per the time zone.

$ date 
Sun Mar 3 06:46:19 +03 2019 

But the problem is if I have set a cronjob 6: 40, and it will not run that time, its run only after3 hours. am not understating why it happens. I have changed time using below command sudo dpkg-reconfigure tzdata and select Aisai/Kuwait.

2
  • 2
    Have you rebooted server so all daemons / background processes have been restarted with the new time setup ?
    – Soren A
    Commented Mar 3, 2019 at 12:05
  • no.. because, first time only i getting this issue, usually i will not restart for time zone change
    – shufilkhan
    Commented Mar 4, 2019 at 5:58

1 Answer 1

1

You may specify the time zone for a crontab entry separately from the system time zone. Different users may also have different time zones specified.

You can specify the timezone to use for crontab with the CRON_TZ. Simply place

CRON_TZ=Asia/Kuwait

on a line above the other crontab entries.

1
  • no... only two users are there root and ubuntu both r running same time zone
    – shufilkhan
    Commented Mar 4, 2019 at 6:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .