Basic scheduling support


#1

Can basic scheduling support, e.g. build once a day at [time] be added to avoid setting up an external trigger?


Chron task support for running daily scheduled build
Scheduled Builds
#2

https://circleci.com/docs/nightly-builds

I think, (based on my understanding of how builds get pushed) that this could be difficult, but I’m not sure.


#3

If you could run a cron job which checks users scheduled settings, it could just kick off builds using your API.


#4

This would be great I think, thanks for the suggestion!


#5

+1 This would have the added benefit of keeping build configurations & triggers in a single place


#6

Agreed. Being able to run a scheduled build or similar via the Circle UI would rock; else we’re stuck maintaining some other system as a very heavy crontab-runner


#7

+1. This would be a great feature. A simple cron interface and ability to define extra environment variables would be perfect. I really dislike that I have to maintain separate infrastructure to add this functionality.


#8

Be sure to click on the heart to show your “official” support for this request. We use the total likes when deciding what to work on next!


#9

Any love on this? Or at least a URL secured with an API key we could hit to trigger a build so we could use a simple service like SetCronJob.com to trigger scheduled builds?


#11

Continuing the discussion from How to run cron job on Circle CI?:

The request, as I understand it, is to add the ability to run regularly scheduled builds from CircleCI.

Such builds could be hourly, nightly, weekly, etc.

This could be in addition to, or in place of, builds normally triggered by pull requests.

If you have further details or thoughts, please comment, but be sure to also :heart: this post as that is how CircleCi gauges interest and prioritizes feature requests.


#12

Yes, the scheduled periodical build (aka “nightly builds”) is super important for any non-open source project.

It’s this: https://docs.travis-ci.com/user/cron-jobs


#13

Just to be sure to make you aware, there’s something like this: https://circleci.com/docs/nightly-builds/ which requires a cronjob to trigger these nightly builds. We use it effectively for our code coverage report.


#14

I creatd an alternative serverless.com approach that use aws lambda and the circleci REST API.
https://github.com/godfreyhobbs/circleci-cron-serverless

This way you do not need to have a server running cron.


#15

For a slightly different use case, I have a project that doesn’t get regular updates, however I would still like to rebuild every once and a while to prevent bitrot and use newer versions of dependencies. I would like to schedule a monthy build so that the running version is never older then that.

For my use case the ideal option would be “Automatically build if last build is older then $n days” but strictly periodic is close enough and simler.


#16

We are planning on add this functionality to our Workflows feature. Please reach out at beta+schedule@circleci.com if you would like to sign up for an early access.


#17

I think this is a great idea. Our current workaround is to use AWS Cloudwatch rules triggering Lambda functions, which in turn trigger the builds via the CircleCI API. So yes, it would be simpler and less moving parts if this were CircleCI functionality.


#18

We have launched a first-class way to run scheduled jobs on CircleCI 2.0.

Below, please find the links to get started:
https://circleci.com/docs/2.0/workflows/#scheduling-a-workflow
https://circleci.com/docs/2.0/configuration-reference/#schedule


#19