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)
Maybe the more efficient is to use the reboot parameter in your crontab with the line like that:
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
andfind / | grep file
. It will exist.