supercronic
supercronic copied to clipboard
Daylight Savings Issue
I had an issue this past Sunday morning during the daylight savings spring forward. I have a cron job that runs every minute, and when the change-over occurred supercronic started logging the following message continually for about 10 minutes until it filled up my VM with a 40gb log file.
{"log":"time=\"2021-03-14T01:00:00-08:00\" level=warning msg=\"not starting: job is still running since 2021-03-14 01:00:00 -0800 PST (0s elapsed)\" iteration=104 job.command=\"/bin/bash -l -c 'cd /home/deploy/app \u0026\u0026 RAILS_ENV=production bundle exec rake process --silent \u003e\u003e /proc/1/fd/1 2\u003e\u003e /proc/1/fd/2'\" job.position=2 job.schedule=\"0 * * * *\"\n","stream":"stderr","time":"2021-03-14T09:00:00.041059641Z"}
I'm setting my localtime zone in my Dockerfile:
ENV TZ=America/Los_Angeles
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
Should I stick to UTC in my container and set the timezone in my cron job? I'm running supercronic version 0.1.11.