I have a job which runs forever the moment it starts.
So i want to start it only once after entering it into "crontab -e" file and saving it (or) whenever reboot happens.
How to achieve this?
cron
I have a job which runs forever the moment it starts.
So i want to start it only once after entering it into "crontab -e" file and saving it (or) whenever reboot happens.
How to achieve this?
Best Answer
If you want a command to run once at a later date, use the
at
command.If you want a command to be run once at system boot, the correct solution is to use either:
@reboot
special prefix (see manpage)The latter is the only option for a non-root user.