Home | Trees | Indices | Help |
|
---|
|
Example Use: from crontab import CronTab tab = CronTab() cron = tab.new(command='/usr/bin/echo') cron.minute().during(5,50).every(5) cron.hour().every(4) cron2 = tab.new(command='/foo/bar',comment='SomeID') cron2.every_reboot() list = tab.find_command('bar') cron3 = list[0] cron3.clear() cron3.minute().every(1) print unicode(tab.render()) for cron4 in tab.find_command('echo'): print cron4 for cron5 in tab: print cron5 tab.remove_all('echo') t.write()
Version: 0.9.3
|
|||
CronTab Crontab object which can access any time based cron using the standard. |
|||
CronItem An item which objectifies a single line of a crontab and May be considered to be a cron job object. |
|||
CronSlice Cron slice object which shows a time pattern |
|||
CronRange A range between one value and another for a time range. |
|||
CronCommand Reprisent a cron command as an object. |
|
|||
CRONCMD = "/usr/bin/crontab"
|
|||
ITEMREX = re.compile('^\s*([^@#\s]+)\s+([^@#\s]+)\s+([^@#\s]+)
|
|||
SPECREX = re.compile('@(\w+)\s([^#\n]*)(\s+#\s*([^\n]*)|$)')
|
|||
DEVNULL = ">/dev/null 2>&1"
|
|||
MONTH_ENUM = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul',
|
|||
WEEK_ENUM = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat',
|
|||
SPECIALS = {"reboot": '@reboot', "hourly": '0 * * * *', "daily
|
|||
S_INFO = [{'name': 'Minutes', 'max_v': 59, 'min_v': 0}, {'name
|
|
ITEMREX
|
MONTH_ENUM
|
WEEK_ENUM
|
SPECIALS
|
S_INFO
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Sep 7 12:30:30 2010 | http://epydoc.sourceforge.net |