Skip to content

EpiForecasts server job scheduling (CRON, docker, and bash)

License

Notifications You must be signed in to change notification settings

epiforecasts/schedule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Schedule routine server jobs

This repository contains the setup scripts, job scripts and scheduling information required to automate routine server jobs. It uses CRON, docker, and bash.

Setup

  1. Clone this repository using:
git clone https://github.com/epiforecasts/schedule.git
  1. Install docker (using your Github username and a PAT code to sign in to the GitHub container registry):
. schedule/setup/docker.sh
  1. Set up credential files at ~/. (using nano ~/.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
  1. Setup the container environments for all scheduled jobs (see setup for each individual container environment):
. schedule/setup/all.sh

Jobs

Individual jobs are defined in jobs as bash scripts and use one of the container environments defined in setup.

Schedule

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

About

EpiForecasts server job scheduling (CRON, docker, and bash)

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages