Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def install_poly_startup_task(self):
- from crontab import CronTab
- cron = CronTab(user='root')
- if not cron.find_comment('poly_start'):
- print "Installing poly_start crontab..."
- job = cron.new(command='rtrdb -r data_service=8001 db &', comment='poly_start')
- job.every_reboot()
- if job.is_valid():
- print "poly_start crontab successfully installed."
- else:
- print "poly_start crontab failed to install"
- else:
- print "poly_start crontab already installed"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement