dagobah icon indicating copy to clipboard operation
dagobah copied to clipboard

Crontab format not correct

Open extrinsicmedia opened this issue 11 years ago • 10 comments

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

extrinsicmedia avatar Jan 31 '14 06:01 extrinsicmedia

@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?

thieman avatar Jan 31 '14 13:01 thieman

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

extrinsicmedia avatar Jan 31 '14 16:01 extrinsicmedia

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.

thieman avatar Jan 31 '14 16:01 thieman

  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.

thieman avatar Feb 08 '14 14:02 thieman

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.

thieman avatar May 08 '14 18:05 thieman

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

gardinerd avatar May 08 '14 19:05 gardinerd

@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!

thieman avatar May 08 '14 19:05 thieman

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

gardinerd avatar May 08 '14 19:05 gardinerd

@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

gardinerd avatar May 09 '14 04:05 gardinerd

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

thieman avatar May 09 '14 10:05 thieman