atTask
Perform a task on a single scheduled time
at command: At [option] time
u common options:
- v Display version Information :
- L: lists the jobs that are waiting to be run in the specified queue; ATQ
- D: deletes the specified job; ATRM
C: View specific Job Tasks
-f/path/from/somefile : Reads a task from the specified file
- m: when a task is completed, a message is sent to the user, even if there is no standard output
u Note: standard output and errors in the results of the job execution command are notified to the relevant user by mail
u Time : define when to do at The time of the task
hh:mm [YYYY-MM-DD]
noon, midnight, teatime ( 4pm )
Tomorrow
Now+#{minutes,hours,days, or weeks}
u Execution Mode:
1 ) Interactive 2 ) input redirection 3 ) at–f file
u at queues are stored in /var/spool/at in the catalog
u /etc/at. {Allow,deny} controls whether the user can perform at Task
White list: /etc/at.allow The default does not exist and only users in that file can perform at Command
blacklist: /etc/at.deny The default exists, rejecting the user in the file to execute at command, and not in
At.deny The user in the file can execute
If none of the two files exist, only Root can perform at Command
Recurring Scheduled Tasks Cron
Commands and Packages
Ensure that the service runs:
CentOS 7:systemctl Status Crond
CentOS 6:service crond Status
system Cron tasks: System Maintenance Jobs
in the /etc/crontab settings in File
The usage rules with the configuration information itself:
First place * represents per minute, desirable value 0-59 , for example, to take a value 5 represents an hourly to start of execution
second place * represents hourly, desirable value 0-23 , for example, to take a value 1 It means that the daily 1 Point ( AM )
third place * represents the monthly number, the desirable value 1-31
Fourth place * represents the year of which January, the desirable value 1-12
fifth place * represents the day of the week, the desirable value ( 0-6 ) Sunday is 0
If the position number is * is representative of each xx time to execute, all are * represents every minute of the execution
For example
The first task represents a 6 Month 5 Day - Point 5 points have Root Identity Run free-m >>/data/memstat.log
the second task represents a Tuesday - Point 5 points have Root Identity Run free-m >>/data/memstat.log
User Cron Task:
because this is Root Execution crontab-e so this means Root users per Ten minutes to perform a later task
u crontab Command Definition
Each user has a dedicated Cron Task file: /var/spool/cron/username
u crontab command: crontab [-u user] [l |-r |-e] [-i]-L: list all Tasks -E: Edit task -r: remove All Tasks -I : Same as -r use together to remove the specified task in interactive mode u User: only root cron Task
u To control user execution of scheduled tasks: /etc/cron. {Allow,deny}
crontab-e Command
|
At |
Crontab |
|
disposable jobs use |
repetitive jobs using |
create |
at time |
crontab -e |
list |
at-l |
crontab -L |
details |
at-c jobnum |
n/a |
remove |
at-d jobnum |
crontab -R |
Edit |
N/A |
Crontab-e |
output that is not redirected will be mailed to the user
Root users can modify jobs for other users
crontab log information for: /var/log/cron*
Linux Task Scheduler