Is there a Python shell around cron?

I am looking for a wrapper around cron.

I came across PyCron, but this is a Python implementation, not a shell.

Do you know any good Python cron shell?

If not, you checked PyCron, and what can you say about it?

// EDIT (as a response to a comment requesting additional information):

I am looking for something to set a cron job with pythonic, for example:

>>> job = CronJob(call_back)
>>> job.schedule(datetime, repeat)
>>> job.schedule(datetime2, repeat2)

And I could edit the currents work this way:

>>> jobs = loadFromCron()
>>> jobs[0].shedule().schedule(datetime, repeat)
>>> print(jobs[0])
<CronJob object - "call_back" at 2009-11-01>

Ideally, this will write and read from "crontab" under Linux and use the "scheduled tasks" under the windows.

I can use the wrong terminology, is it better to talk about the cron Python API?

+5
source share
1 answer

python-crontab crontabs python.

from crontab import CronTab

tab = CronTab()
cron = tab.new(command='/foo/bar')
cron.every_reboot()
tab.write()
+9

All Articles