The job_manager.py script runs a job by its identifier as defined in runtime site.conf. It handles
such things as not running a job which is already running, killing off jobs
which have exceeded their defined TTL, and so on.
This script is primarily to be used
by cron. However, you can run it manually to execute defined jobs, get information
about running jobs, view the configuration for jobs, and more.
Usage
job_manager.py [--help|h]
job_manager.py [--kill|k] <job_id> | [--job|j] <job_id>
job_manager.py [--list|l] | [--showjob] <job_id> | [--showmgr|m] | [--showall|S] | [--showstats] | [--showbadstats] | [--showsummary]
job_manager.py [--processtiming]
job_manager.py [--selftest | --monitor]
Options
- --help
- Display this help.
- --kill=<job_id>
- Kill the managed job by identifier.
- --job=<job_id>
- Run the job defined by the identifier.
- --list
- List information about all currently running jobs (identifier, pid, elapsed
time, etc.).
- --showjob=<job_id>
- Display the definition for the specified job (in configparser format).
- --showmgr
- Display the configurations for the job manager itself (in configparser
format).
- --showall
- Display the definitions for all known jobs (in configparser format). Only
sections recognized as being job definitions are displayed.
- --showstats
- Display all statistics on jobs gathered since the last time the
--processtiming task was run. Jobs with 'worrisome' events are marked with
'!!!'. Does not display historical data (use --showsummary for
historical statistics).
- --showbadstats
- Same as --showstats, but only display the jobs with 'worrisome' events.
- --showsummary
- Display the statistics gathered over time by the --processtiming task. This
looks at historical data, but not at current statistics (use --showstats for
current statistics).
- --processtiming
- Administrative task which takes the current statistical data and combines it
with existing historical data to update the historical data. This task
effectively zeros out the current statistical data, and can be used as a
check on the growth of timing files.
- --monitor
- Convenience method which runs 'watch' on the timing and job directories.
Can be used to watch the activity of the management system over time.
- --selftest
- Runs a light set of tests against this script; mostly used for debugging and
sanity-checking this script.
Examples:
Run the job "[job:update_ai_profiles]" defined in site.conf:
job_manager.py --job=job:update_ai_profiles
List all running jobs:
job_manager.py --list
Show the configuration for a specific job:
job_manager.py --showjob=job:update_ai_profiles
Show all configuration relevant to the job manager, defined jobs, etc.:
job_manager.py --showall