[[PageOutline(2-5,Contents,pullout)]] = A job scheduler and monitoring plug-in for Trac = === ''This is a stub, we are currently developing this module and suggestions would be welcome. So please add your feature requests tickets against the JobControlPlugin component.'' === == Description == The plugin lets you set up and manage and monitor scheduled jobs. It adds the following new Admin screens to Trac: * Job Admin - List and lets you add, edit and delete jobs. * Job Status Map - Where you can see the status of the last run of all the jobs. From here you can drill down to the run view of a particular job. * Run View - Lists all job runs, showing you the runs status form where you can drill down to the runs log. * Log Admin - Clean-up logs and other tasks. Each job run environment and schedule is specified by the version of a single configuration file - a python script - in the SCM. Therefore any changes are carefully tracked. This script is used to create the sandbox and invoke the job. == Screenshots == * The Job Screen [] == Bugs/Feature Requests == Existing bugs and feature requests for JobControlPlugin are [report:9?COMPONENT=JobControlPlugin here]. If you have any issues, create a [http://trac-hacks.org/newticket?component=JobControlPlugin&owner=thanos new ticket]. == Download == It's not yet available, but when it is you will be able to download the zipped source from [download:jobcontrolplugin here]. == Source == It's not yet available, but when it is you will be able to check out JobControlPlugin from [http://trac-hacks.org/svn/jobcontrolplugin here] using Subversion, or [source:jobcontrolplugin browse the source] with Trac. == Example == Here is an example of a job configuration. {{{ #!python from jobcontrolplugin import JobSpec, today from logging import DEBUG class MyJob(JobSpec): """ Run this script with logging in debug mode. Run every 45 minutes. Run /usr/local/etc/myscript at yesterday's date as a command argument. """ grouping="/All Jobs/Tests" log_level=DEBUG cron="* * * 45"; cmd ="/usr/local/etc/myscript --date=%s"; % today(-1) run= "runA, runB"; def setUp(self): pass def tearDown(self): pass def runA(self): pass @dependsOn(runA) def runB(self): pass MyJob.run() }}} You would check it in and make the Job record point to it. ||'''Job Id'''||'''Last Run'''||'''Status'''||'''Next Run'''||'''Configuration'''|| || || ||My Job|| 12:45 Today || 13:00 Today || OK || [# http://trac-hacks.org/browser/myjob.py?rev=6077]|| || || == Recent Changes == [[ChangeLog(jobcontrolplugin, 3)]] == Author/Contributors == '''Author:''' [wiki:thanos Thanos Vassilakis] [[BR]] '''Maintainer:''' [wiki:thanos Thanos Vassilakis] [[BR]] '''Contributors:'''