Programmatically Edit Crontab


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  1. # Disable all cron jobs
  2. EDITOR='perl -pi -e s/^/#off#/' crontab -e; crontab -l
  3.  
  4. # Enable all cron jobs
  5. EDITOR='perl -pi -e s/^#off#//' crontab -e; crontab -l

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.