TaskForest
A simple, expressive, open-source, text-file-based Job Scheduler with console, HTTP, and RESTful API interfaces.
Documentation
Running TaskForest
To run the taskforest
you must let it know where it can find the necessary files and directories. This can be done by environment variables, via the command line, or via the configuration file:
export TF_JOB_DIR=/foo/jobs
export TF_LOG_DIR=/foo/logs
export TF_FAMILY_DIR=/foo/families
export TF_RUN_WRAPPER=/foo/bin/run_with_log
taskforest
OR
taskforest --run_wrapper=/foo/bin/run_with_log \
--log_dir=/foo/logs \
--job_dir=/foo/jobs \
--family_dir=/foo/families
OR
taskforest --config_file=/foo/config/taskforest.cfg
By default, the program will run the same code in a loop continuously until 23:55 (11:55 pm). At the end of each iteration of the loop it will wait for 60 seconds (by default) before starting the next iteration of the loop. Within each loop, the program will do the following:
- Examine ALL the Family files and determine whether a Family should run today or not, based only on the days of the week for which the Family is configured to run.
- For each Family that should be run today,
- the status all jobs in the Family is determined - this is called 'getting the Family current.'
- every job that is in the Ready state in will be run - this is called 'cycling the Family.'
If taskforest
is run with the --once_only
option, then the main loop will be executed once and then program will terminate immediately, instead of waiting until 23:55.
All jobs will run as the user who invoked taskforest
.