How to create an executable script that starts execution at a specific date and time?
How can I create an executable script that starts execution at a specific date and time (if is possible without rebooting the PC)?
|
You can use the "at" command to schedule a one-time execution at an arbitrary date and time, or use cron to schedule a repeating execution.
|
Create the script.
Locate it in some directory, such as /usr/local/bin Add a crontab entry for the correct user: root's if root privs are needed |
BTW, the default env inside cron (esp PATH) is minimal, so always provide the complete path to any cmd used eg don't just say
date say /bin/date and so on for each cmd. |
All times are GMT -5. The time now is 04:40 PM. |