Beispiel #1
0
def update_crontab(jobs=None):
    if jobs is None:
        jobs = []
        for job in get_jobs():
            jobs.append(job)
    new_crontab = crontab.update_crontab(jobs)
    if app.config['DEBUG']:
        print "Debug mode, would have updated crontab to:"
        print new_crontab
    else:
        crontab.save_crontab(new_crontab)
Beispiel #2
0
def update_crontab(jobs=None):
    if jobs is None:
        jobs = []
        for job in get_jobs():
            jobs.append(job)
    new_crontab = crontab.update_crontab(jobs)
    if app.config['DEBUG']:
        print "Debug mode, would have updated crontab to:"
        print new_crontab
    else:
        crontab.save_crontab(new_crontab)