The at command can execute the specified task at the specified time.
The crontab command can periodically execute some characters.
Differences:
At: the process is canceled from the Linux system once the worker executes it.
Crontab: this job will be routine.
Usage 1:
Command Line input:
At tomorrow:
Warning: commands will be executed using/bin/sh
At> enter the command to be executed after the time. You can enter multiple lines and press Ctrl + D.
You can.
Usage 2:
Save the command as a file and then execute:
At-F file name: Tomorrow press Enter.
It is best to add executable permissions to this file.
In addition, if you want to restart, consider the root permission issue.
Note: Your runningProgramIt will be executed, but it is not displayed. To display the data, you must specify the display position. For example
At now + 1 minutes
Warning: commands will be executed using/bin/sh
At> export display =: 0 & Firefox
At> <EOT>
One minute later, Firefox will be displayed on 0th desktops.
Or you can test the AT command to run it:
Touch ~ /Amai
You can also use the AT command as a reminder under X.
Run the following command:
At 12: 00
Mail =/dev/null display =: 0 zenity -- info -- text "Time to lunch"
At> [Ctrl + D]
PS. Set mail =/dev/null at the at prompt so that no email will be sent after the reminder is complete.
Execution result: