This is the old SliTaz forum - Please use the main

cron uses only UTC, not the default time
  • kultexkultex February 2011
    is there a possibility to say cron to run in the default timezone? - I changed /etc/TZ to Europa/Vienna - and date prints the correct time with CET 2011.

    The cron jobs are 1 hour to late and date in the log files show that cron is still running UTC

  • marquiticomarquitico February 2011
    I believe you should be able to, yes, so long as the version of cron that SliTaz has will permit it. Have you tried to put environmental variables into your crontab? Here's an example from the Internet:

    23 * 1-9,11-26,28-29,31 2-10,12 * exec /var/tmp/cron/ 23 \* 1-9,1
    1-26,28-29,31 2-10,12 \* Africa/Abidjan
    3 0-7,9-10,12-22 1-6,8-9,11-21,24-26,28 1-7,9-10,12 * exec /var/tmp/cron/crontes 3 0-7,9-10,12-22 1-6,8-9,11-21,24-26,28 1-7,9-10,12 \* Africa/Abidjan
    37 0-2,4-5,7-17,20-22 * * * exec /var/tmp/cron/ 37 0-2,4-5,7-17,2
    0-22 \* \* \* Africa/Accra

    You can see that you can even set more than one time zone. The crontab is read from top to bottom, so a time zone variable is valid until cron reads the next one.

    I don't have an installation of SliTaz (only using LiveCD version so far), so I have not tried this on SliTaz myself, but maybe it's a place to start investigating...?
  • kultexkultex March 2011

    thx marquitico for the info - it works also in SliTaz, but not after a reboot - it still stays on UTC.

    I have to restart cron - then it works -strange

  • marquiticomarquitico March 2011
    Hmmm. We really need an expert to join this conversation, but it sounds like something wrong with the boot sequence. One needs to be certain that when the computer boots up, anything that is time-sensitive must wait until after the system itself sets the timezone. So if it works after a boot up only when you do it yourself, maybe the crond is being started too early in the boot process?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social