-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Drone to scheduled builds #2111
Comments
link
link is broken - Page Not Found |
That link is outdated which is why it was removed. Drone 1.0 has native cron capabilities. Go to your repository settings screen and you will see options to schedule cron jobs, including a nightly option. |
The cron scheduler does not seem to respect the TZ environment variable, so the "daily" schedule ends up being "midnight at UTC", is this expected? Alternately, the drone cron cli could support https://godoc.org/github.com/robfig/cron#hdr-Time_zones: $ drone cron add $repo nightly "CRON_TZ=America/Los_Angeles 0 0 0 * * *" |
Yes, this is the expected behavior since Drone uses unix timestamps and UTC times throughout the codebase. The ability to handle different timezeones was considered out of scope for our initial cron implementation.
We only use the We might be able to cast the parsed cron expression to |
UPDATE I did some more research and it looks like the CRON_TZ feature was added to this library a few months after we implemented cron in Drone. We are using a snapshot of the library from May 2018 and the CRON_TZ feature was added in Feb 2019. Updating to a newer version of the library may allow you to take advantage of CRON_TZ without any code changes to Drone itself. |
@bradrydzewski thanks for the response! I'll try to give this a go if time allows. |
I would like to have the opportunity to schedule a build let's say every night to build a canary version a release it.
This feature should be something like cron job with timezone and target a branch.
I would like also to be able to have severals schedule builds.
The text was updated successfully, but these errors were encountered: