gsksivesh / dagobah

Simple DAG-based job scheduler in Python
Do What The F*ck You Want To Public License
2 stars 1 forks source link

Crontab format not correct #17

Open gsksivesh opened 5 years ago

gsksivesh commented 5 years ago

Issue by extrinsicmedia Friday Jan 31, 2014 at 06:20 GMT Originally opened as https://github.com/thieman/dagobah/issues/46


The 'Cron Schedule String' entry: 00 22 * * *

is evaluating 'Next Scheduled Run' as: January 31 2014 2:00 PM

but I think this should be: January 30 2014 11:00 PM

gsksivesh commented 5 years ago

Comment by thieman Friday Jan 31, 2014 at 13:16 GMT


@extrinsicmedia The Cron entry gets interpreted as a local time on the server running Dagobah. The frontend then takes the UTC representation of that time and shows it to you in your browser's timezone. My guess is that your server and your browser are about half a world away from each other. Am I close?

gsksivesh commented 5 years ago

Comment by extrinsicmedia Friday Jan 31, 2014 at 16:29 GMT


@thieman I'm testing locally so they're both on the same machine. Possible that the Cron entry is getting interpreted from UTC 0?

gsksivesh commented 5 years ago

Comment by thieman Friday Jan 31, 2014 at 16:34 GMT


Hmm, yeah maybe something is getting converted where it shouldn't. I testing servers running UTC, so it'd make sense if I missed something. Will check it out, thanks.

gsksivesh commented 5 years ago

Comment by thieman Saturday Feb 08, 2014 at 14:42 GMT


  1. The server is asserting that the Cron time is based on UTC. This needs to instead use the server's local time.
  2. When the server passes datetimes to the frontend, they do not have TZ information. The frontend assumes that everything is in UTC. The backend should convert its datetimes to UTC before sending them to the frontend.
  3. I don't think the frontend ever sends datetimes to the backend (it only sends Cron strings), so we don't have to juggle authoritative timezones between the client and server. Hooray.
gsksivesh commented 5 years ago

Comment by thieman Thursday May 08, 2014 at 18:26 GMT


I think I wrote a fix for this like two months ago. I'll actually get off my ass and try to merge it this weekend.

gsksivesh commented 5 years ago

Comment by gardinerd Thursday May 08, 2014 at 19:06 GMT


I ran into this issue as well while running on a server set to EDT. Happy to help test this out further.

gsksivesh commented 5 years ago

Comment by thieman Thursday May 08, 2014 at 19:07 GMT


@creator11 This is my work-in-progress branch if you'd like to give it a go: https://github.com/thieman/dagobah/tree/tnt-fix-cron-format

Thanks for the assist!

gsksivesh commented 5 years ago

Comment by gardinerd Thursday May 08, 2014 at 19:10 GMT


Thanks I'll give it a go through a QA regression.

gsksivesh commented 5 years ago

Comment by gardinerd Friday May 09, 2014 at 04:18 GMT


@thieman pull down the new branch and built. However after building and running the branch it appears you cannot create new jobs. Using the SQLiteImpl

gsksivesh commented 5 years ago

Comment by thieman Friday May 09, 2014 at 10:35 GMT


Well, that's certainly interesting. Will take another pass this weekend, thanks.