You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally we only made the autostart backend a 3-valued cron string, but most cron libraries only handle the traditional 5-valued cron string. This would allow us to reduce some complexity in the frontend code.
I think so, but only if the backend was validating that we always received a full valid 5-value cron string (with optional timezone). The only reason it would help is so that I know I can pass these strings directly from the backend into JS cron libraries for validation and display.
I plan on making the C/U form a set of widgets that under the hood produce a cron string. So imagine an input for your timezone, one for time and another with the 7 days of the week that you select/deselect.
I had since updated my answer, very specifically the requirements are that:
the backend will always validate that it receives a valid 5-value cron string
the backed will validate that the d-of-m and m values are *
The latter could appear as an unnecessary constraint; but the reason I want to start this is way is that it simplifies the level of effort to launch support for weekly only. Should more complicated schedules be required later on, we can lift the validation that d-of-m and m are * without a data migration, and simply add those inputs in the FE.
…atibility (#1049)
This PR modfies the original 3-valued cron strings used in package schedule to be traditional 5-valued cron strings.
- schedule.Weekly will validate that the month and dom fields are equal to *
- cli autostart/autostop will attempt to detect local timezone using TZ env var, defaulting to UTC
- cli autostart/autostop no longer accepts a raw schedule -- instead use the --minute, --hour, --dow, and --tz arguments.
- Default schedules are provided that should suffice for most users.
Fixes#993
Originally we only made the autostart backend a 3-valued cron string, but most cron libraries only handle the traditional 5-valued cron string. This would allow us to reduce some complexity in the frontend code.
Originally posted by @vapurrmaid in #991 (comment)
The text was updated successfully, but these errors were encountered: