Skip to content

Instantly share code, notes, and snippets.

@nenodias
Last active May 4, 2016 20:01
Show Gist options
  • Save nenodias/e40d9390f06c701d922a to your computer and use it in GitHub Desktop.
Save nenodias/e40d9390f06c701d922a to your computer and use it in GitHub Desktop.
# *-* coding:utf-8 *-*
# pip install python-crontab croniter
from crontab import CronTab
#init cron
cron = CronTab()
#add new cron job
job = cron.new(command='python /home/horacio/Downloads/teste.py')
#job settings
job.setall(job.minutes.every(1))
job.enable(True)
job.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment