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.

link|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
feedback

2 Answers

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.

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

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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