Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

New to Ubuntu (and Linux in general) and have whipped up a quick python script to backup my files and do some other housekeeping. I don't see any service scheduling tools and was wondering what the best way to do this is.

share|improve this question
    
There's a ton of backup tools, you don't have to write your own. Check out duplicity for example. –  vtest Mar 25 '11 at 16:01

2 Answers 2

up vote 0 down vote accepted

Use cron.

  1. Run crontab -e

  2. Add this line:

    0 0 * * * ~/myscript.py
    

    Or simpler:

    @daily ~/myscript.py
    
  3. Exit the editor.

See the Wikipedia article for an explanation of crontab format.


I don't know which editor Ubuntu picks by default, but it's likely to be a terminal-based one. If it's nano, use CtrlX to exit. For vim, Esc, then :wq Enter.

To get the GNOME Editor, use export EDITOR=gedit before running crontab.

share|improve this answer
    
Thanks @grawity! –  Pam Mar 25 '11 at 16:17

install webmin first. it gives you an easy way to setup scheduled (cron) jobs. just point and click in a GUI.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.