This repository contains the setup scripts, job scripts and scheduling information required to automate routine server jobs. It uses CRON, docker, and bash.
- Clone this repository using:
git clone https://github.com/epiforecasts/schedule.git
- Install docker (using your Github username and a PAT code to sign in to the GitHub container registry):
. schedule/setup/docker.sh
- Set up credential files at
~/.
(usingnano ~/.gitconfig
etc.):
.gitconfig:
[user]
name = thomas the tank engine
email = [email protected]
.netrc:
machine github.com
login TtheTank
password github-pat
machine api.github.com
login TtheTank
password github-pat
- Setup the container environments for all scheduled jobs (see
setup
for each individual container environment):
. schedule/setup/all.sh
Individual jobs are defined in jobs
as bash
scripts and use one of the container environments defined in setup
.
Job scheduling is defined in crontab.sh
- see here for help defining a schedule for a job. Logs from each job are stored in the logs
folder. After adding a job to crontab.sh
or when setting up a new scheduling server use the following to update the crontab
:
crontab < schedule/crontab.sh
Then check the crontab
is as expected using:
crontab -l