https://github.com/epiforecasts/schedule
EpiForecasts server job scheduling (CRON, docker, and bash)
https://github.com/epiforecasts/schedule
Last synced: 9 months ago
JSON representation
EpiForecasts server job scheduling (CRON, docker, and bash)
- Host: GitHub
- URL: https://github.com/epiforecasts/schedule
- Owner: epiforecasts
- License: mit
- Created: 2021-01-10T15:53:06.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-17T10:31:35.000Z (about 2 years ago)
- Last Synced: 2025-06-14T13:05:52.303Z (12 months ago)
- Language: Shell
- Homepage:
- Size: 64.5 KB
- Stars: 1
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```
2. Install docker (using your Github username and a PAT code to sign in to the GitHub container registry):
```
. schedule/setup/docker.sh
```
3. Set up credential files at `~/.` (using `nano ~/.gitconfig` etc.):
```
.gitconfig:
[user]
name = thomas the tank engine
email = thomas.the.tank.engine@engines.com
.netrc:
machine github.com
login TtheTank
password github-pat
machine api.github.com
login TtheTank
password github-pat
```
4. 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](https://crontab.guru) 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
```