TaskForest
A simple, expressive, open-source, text-file-based Job Scheduler with console, HTTP, and RESTful API interfaces.
Documentation
  1. Downloading TaskForest
  2. Installing TaskForest
  3. Configuring TaskForest
    1. Jobs & Families
    2. Calendars
    3. Automatic Retries
    4. Sending Emails
    5. Options
    6. Configuration File
  4. Running TaskForest
  5. Running the TaskForest Web Server
  6. Web Server Security
  7. Checking TaskForest Status
  8. Rerunning a Job
  9. Marking a Job
  10. Tokens
  11. Releasing all Dependencies from a Job
  12. Putting a Job on Hold
  13. Releasing a Hold Off a Job
  14. HOWTO
  15. The RESTful Web Service
  16. Frequently Asked Questions (FAQ)
  17. Bugs
  18. Change Log
  19. Author
  20. Acknowledgements
  21. Copyright

Configuration File

The 'taskforest' and 'status' commands now accept a ``--config_file=f'' option. You can now specify commonly used options in the config file, so you do not have to include them on the command line. The config file should contain one option per command line. The following sample config file shows the list of all supported options, and documents their usage.


# ########################################
# SAMPLE CONFIG FILE
# ########################################
# These are the four required command line
# arguments to taskforest
log_dir          = "t/logs"
family_dir       = "/usr/local/taskforest/families"
job_dir          = "/usr/local/taskforest/jobs"
instructions_dir = "/usr/local/taskforest/instructions"
run_wrapper      = "/usr/local/bin/run_with_log"


# the name of the directory that contains calendar files
calendar_dir    = "/usr/local/taskforest/calendars"

# wait this many seconds between iterations of
# the main loop
wait_time       = 60

# stop taskforest at this time of day
end_time        = 2355

# if set to 1, run taskforest once only and
# exit immediately after that
once_only       = 0

# print out extra logs - may be redundant,
# due to log_threshold, below
# THIS OPTION WILL BE DEPRECATED SOON.
verbose         = 0

# by default assume that the --collapse option
# was given to the status command
collapse        = 1  # change from previously
                     # default behavior

# by default assume that all repeating jobs
# have the --chained=>1 attribute set
chained         = 1  # change from previously
                     # default behavior

# log stdout and stderr to files
log             = 1

# by default, log stdout messages with status >= this value.
# This only effects stdout
# The sequence of thresholds (smallest to largest) is:
# debug, info, warn, error, fatal
log_threshold   = "warn"

# The log_file and err_file names should NOT end with
# '.0' or '.1' because then they will be mistaken for
# job log files
log_file        = "stdout"  
err_file        = "stderr"  

# currently unused
log_status      = 0

# ignore family files whose names match these regexes
ignore_regex    = "~$"
ignore_regex    = ".bak$"
ignore_regex    = '\$'

# There are two types of tokens in this example:
# T - with 1 instance
# U - with 2 instance
<token T>
  number = 1
</token>
<token U>
  number = 2
</token>


# This is the number of times to automatically
# retry running a job that fails 
num_retries              = 1

# Wait these many seconds before automatically
# retrying running a job that fails 
retry_sleep              = 300


# This is the SMTP server that will be used to send 
# emails out when a job fails, for example
smtp_server              = "localhost"

# The default SMTP port is 25.
smtp_port                = 25

# In a production environment this should be 60 or 120
smtp_timeout             = 60

# This is the SMTP envelope sender 
# (the text after "MAIL FROM:")
smtp_sender                = "user1@example.com"

# This is the email address that appears in the From: 
# mail header
mail_from                = "user1@example.com"

# If a user replies to a received email, the reply
# will go to this address instead of the From: address. 
# This address is set in the Reply-To mail header.
mail_reply_to            = "user2@example.com"

# This is the address to which bounces will be sent if 
# they occur at the SMTP server (as opposed to the 
# receiving Mail Transfer Agent).
mail_return_path         = "user3@example.com"

# This is the directory that stores the contents of
# the emails that are sent by the system. 
instructions_dir         = "instructions"

# When a job fails, emails are sent to this address
email                    = "test@example.com"

# When a job fails, but is being automatically retried,
# emails are sent to this address, as opposed to the 
# one stored in the 'email' setting.  If no_retry_mail 
# is set, then no email will be sent in this case
retry_email              = "test2@example.com"

# When a job fails, is automatically retried one or more 
# times and then suceeds, emails are sent to this 
# address, as opposed to any of the others.  If 
# no_retry_success_email is set, then no email will be sent
# in this case.
retry_success_email      = "test3@example.com"

# If this is set to 1, then an email will not be sent 
# when a job fails and is being automatically retried.
no_retry_email           = 0

# If this is set to 1, then an email will not be sent 
# when a job fails, was automatically retried one or more 
# times and then finally succeeded.
no_retry_success_email   = 0