AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  Wrong Time zone for cron

    Posted Mon December 28, 2009 04:05 AM

    Originally posted by: salmanucit77


    Hi,
    I have AIX 6.1 running on IBM power system. My server is located in singapore but its time zone was wrongly set to GMT-4. We have set the time zone correctly to GMT+8 but our cron jobs are still running according to previous time zone. For example, my cron job is 0 1 * * * * /script.sh runs at 3 PM according to singapore time but ideally it should run at 1 AM mid night. Please guide me how to fix this problem.

    Thanks

    Salman
    #AIX-Forum


  • 2.  Re: Wrong Time zone for cron

    Posted Mon December 28, 2009 02:29 PM

    Originally posted by: SystemAdmin


    Have you killed and restarted the cron daemon yet?

    The running process probably still has the old TZ environment variable value.
    #AIX-Forum


  • 3.  Re: Wrong Time zone for cron

    Posted Mon December 28, 2009 09:33 PM

    Originally posted by: salmanucit77


    Hi,
    Can you please guide me how can i kill the cron deamon and restart it so that it picks up the correct time zone of the server for executing cron jobs.

    Thanks
    #AIX-Forum


  • 4.  Re: Wrong Time zone for cron

    Posted Mon December 28, 2009 11:26 PM

    Originally posted by: Kosala


    Hi,

    Cron is started through inittab with the respawn action, therefore you can kill -9 and be done with it. The init process will automatically spawn another process.

    Kosala
    #AIX-Forum


  • 5.  Re: Wrong Time zone for cron

    Posted Mon December 28, 2009 11:44 PM

    Originally posted by: salmanucit77


    Thanks :)
    #AIX-Forum