Basically I have a script (.sh) that syncs a local folder with an FTP one (using cron to run this).

This script needs to be ACTIVE AT ALL TIMES (business use :D) and the only thing I cant control is the regular powercuts at work. When I am away there is a high possibility (due to powercuts) that my computer may restart.

Issue is, that script needs to still run. Is there anyway to have cron running at startup without logging into the machine with my password?

(no previous similar questions have directly answered my question btw)

  • What makes you think the script is not running if you are not logged in? It should be.
    – fkraiem
    Apr 28 '16 at 8:25

Maybe the more efficient is to use the reboot parameter in your crontab with the line like that:

@reboot /home/user/script.sh

It will launch the script every time the server boot. I use that on several servers to send me a mail when it boots.


To proof, that crons are starting: Make a cron like @reboot touch file and find / | grep file. It will exist.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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