Using Semaphore’s build scheduler allows you to run a build, or any kind of job, on a daily or hourly basis. This is useful in a number of use cases:
To use the scheduler, go to your project settings and open the “Build Scheduler” tab.
Select the branch on which the build scheduler should perform. By default this is the master branch.
Select whether you’d like your builds to run daily or hourly. Note that in case of daily builds, the time you select is in UTC time zone. For hourly builds, you can choose whether they will run at the beginning of every hour (XX:00), or mid-hour (XX:30).
Finally, click on “Enable build scheduler” and save your settings.
Your scheduled builds will appear in the project timeline.
From the moment they run, scheduled builds behave exactly like any other build on Semaphore: they execute currently configured build commands and, depending on your other configuration, may trigger notifications or an automated deploy.
Note: There is an automatically exported environment variable called SEMAPHORE_TRIGGER_SOURCE which will be set to "scheduler" if the build is triggered by the build scheduler. This can be used for specifying commands that you want to execute only in this kind of builds like:
if [ "$SEMAPHORE_TRIGGER_SOURCE" = "scheduler" ]; then bundle exec rake spec:nightly ; fi
Semaphore Docs are open source — Edit on GitHub