aptible / supercronic

Cron for containers
MIT License
1.91k stars 115 forks source link

[Request] Implementing CRON_TZ #77

Closed piotrekkr closed 3 years ago

piotrekkr commented 4 years ago

Hi, I'm trying to use UTC time zone whenever I can in my projects and there is this one functionality missing for me in supercronic. It's ability to change scheduler time zone without changing system time zone. Have you considered implementing such functionality?

I'm using docker debian image with supercronic installed and I want to run commands with default system time zone (UTC) but scheduler itself should run commands at different time zone (e.g Europe/Warsaw). Setting cron scheduler time zone for all commands using CRON_TZ variable would be great. Even better if you could overwrite it in individual cron entries.

I know I can set TZ variable for container to Europe/Warsaw and then in crontab file set TZ=UTC before commands but it seems like workaround.

P.S. Thank you for your great work!

krallin commented 3 years ago

I added this in #80

piotrekkr commented 3 years ago

@krallin Thank you for your awesome work 👍