I am trying to make a cron
for my machine. It there a possibility to make it for every starting up of my pc?
Some way like this :
# File : /tmp/crontab.LgVuXf/crontab
uptime ... command
I am trying to make a cron
for my machine. It there a possibility to make it for every starting up of my pc?
Some way like this :
# File : /tmp/crontab.LgVuXf/crontab
uptime ... command
As specified in man 5 crontab
, which contains the format of crontab files:
Instead of the first five fields, one of eight special strings may appear:
string meaning ------ ------- @reboot Run once, at startup. @yearly Run once a year, "0 0 1 1 *". @annually (same as @yearly) @monthly Run once a month, "0 0 1 * *". @weekly Run once a week, "0 0 * * 0". @daily Run once a day, "0 0 * * *". @midnight (same as @daily) @hourly Run once an hour, "0 * * * *".
So you should be able to add a crontab line in the form
@reboot bash /full/path/to/the/script
You can use the command crontab -e
to edit the file, or input directly --- look at man crontab
for details.