Atd checks whether the process started
[Root @ centos61 Desktop] # service atd status
atd (pid 2274) is running ...
[Root @ centos61 Desktop] # chkconfig | grep atd
atd 0: Close 1: 2 Close: close 3: Enable 4: Enable 5: 6 Enable: Off
If it does not, you can use the following command:
[Root @ centos61 Desktop] # service atd start
Starting atd: [OK]
[Root @ centos61 Desktop] # chkconfig atd on
Common commands: at: delay scheduled tasks
Specific use:
Example 1:
#at now+2 minutes 回车
> Enter the command to be executed
> Ctrl + d input end
[root@test ~]# at now+2 minutes
at> wall Aixi
at> <EOT>
job 2 at 2010-06-18 16:36
<EOT> ctrl + d is an interrupt input, the command transmitting means is a broadcast contents are Hello Aixi. Specific time can be changed, the unit can be changed, can be hours, months, years, weeks and so on.
Example 2 we can also follow the specific time
[root@test ~]# at 16:39 dec 10
at> Hello Aixi
at> <EOT> ctrl + d input end
job 3 at 2010-12-10 16:39
Meant to run at 16:39 on December 10th of this year the order. If not months, and days, the default is today.
Atq: query the current task waiting
With atq to query, the task has been running, he disappeared. This is the focus at the scheduled task to run only once
atrm : Delete waiting task
After starting the scheduled task, if you do not set a good start scheduled tasks you can use the command to delete atrm.
Format: atrm task number
Command followed by a scheduled task number, if not followed, the user will delete all scheduled tasks.
Example 3
atrm 10 // deleting scheduled tasks 10
atq // Check whether to delete the scheduled tasks
at the command will be run in the form of text written in / var / spool / at / directory, and waiting for access to execution atd services.
You can also enter to / var / spool / at directory to delete a scheduled task, the scheduled task files are stored in the directory, you can use rm -f filename to delete (delete the scheduled tasks in the form of a file, because the task is to plan saved as files in that directory)
Example 4:
#cd / var / spool / at // into / var / spool / at directory
ls // display all the files in the directory
rm -f a0000b0138b19c // delete the scheduled task
Under normal circumstances, the superuser can use this command. For other users, the ability to be used depends on two files: /etc/at.allow and /etc/at.deny.
at the command can be controlled based on the user, we can explicitly specify which users can use at a scheduled task, which users can not use at a scheduled task.
at the control file
/etc/at.allow
/etc/at.deny
The default file system is at.deny, if a user name in this file, he can not use at a scheduled task. If there at.allow file, allow file first, check out allow explicitly permitted, will not be checked deny.
If you want what you can not use a scheduled task, the user directly to his name written into the family to stay, and one can only write a row.