• Home
  • crontab
  • BACK P.P.

  • Need to edit crontab??

    Need to edit crontab? Your Raspi is stuck for a wrong editing of crontab (or rc.local)?

    It happened to me, in order to automatically start a .py at boot, I entered in crontab a line (@boot python ……………) that caused my Raspi to stuck. The only way to recovery from this mess was to re-edit crontab but for normal editing you must first boot your Raspi!
    When you write crontab –e (same as sudo crontab –e) you edit a file that is only a copy of the one that will be used for automatize your linux.
    If you have to edit a file for a not-booting Raspi you can, usually, put the sd card in a computer running linux.
    I used a live distro on a PC with sd card reader and I was able to enter the wheezy. However the crontab file, unlike rc.local, is not easy to find but you can reach it by:


    then, edit the root file with sudo.
    This “root” file is just the crontab working at boot.
    You can edit it (remove the line causing stuck), save and boot again your Raspi with no problem.
    Next time avoid to use a .py at boot that uses GPIO because it causes the Raspi to stuck and try with /etc/xdg/lxsession/LXDE-pi/autostart.