+
Skip to content

teh/ctab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple cron parsing tools

These tools help with parsing the time specs in cron files. Time specs look like '* * * * Sun' or '1-30/5 * * * *'. These tools do not parse entire cron files.

A simple example:

import datetime
from ctab.ctab import parse, match, cron_iter

spec = parse('* * * * *')
print match(spec, datetime.datetime.utcnow())
# Prints True

i = cron_iter(spec)
print i.next()
print i.next()
# Prints something like:
# 2012-04-27 13:58:09.152578
# 2012-04-27 13:59:09.152578

Testing

Install nose test, then run:

nosetests

About

python crontab parser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载