The at command in the Linux system can be executed periodically, while the crontab command is executed cyclically, so both commands can control the running time of the program. Here's how to use the at/crontab command on Linux systems?
at command to be executed, as long as at the time, press enter, and then enter the command to be executed, the end of the pressing ctrl + d can be scheduled at a schedule.
The time format of at can be 1 digit (specified hour), 2 digits (specified hour), 4 digits (specified hour and minute), and the middle and the minute can also be used: Separate, such as 03 :45. In addition, you can add am, pm to specify the last afternoon, otherwise at will treat the time as a 24-hour system, such as 05:25pm. In POSIX, there are a few other special times:
Time-time
The range of numbers is [00,59].
midnight = 12:00 am (00:00)
noon = 12:00 pm
now = Specify the time to execute at
Date- Date
The number used in the year is AD, which must be 4 digits.
When you specify the month and week, the word used depends on the "month" and "week" names listed in the LC_TIME environment variable or their abbreviation.
The date must match the month specified.
today = today
tomorrow = tomorrow
increase-increment
can use words such as minutes, hours, days, weeks, months, or years When using, start with a + sign.
Use the commands executed by the at command, the environment variables used, the working directory, the mask created by the file, and so on. When the scheduled command is actually executed, these variables are the same as when the at command is executed.
at Execute Permission Control File:
/usr/lib/cron/at.allow
/usr/lib/cron/at.deny
Example:
at 6pm
at moon
at today
at 02:00am
at 18:00
at 18:00
at 6pm today + 1 week is equivalent to at 6pm today next week
at 6pm Jan 2 , 2005
at 6pm mon
at now
at the time the command is to be executed, it will be executed until the next time, for example, it is specified at 6:00 tonight, but now it is 7:00. The order will be executed at 6:00 tomorrow evening.
To delete a scheduled job, use at -r at-job-id
Under gentoo, the default is no at program, you must first install the following command Only:
emerge -av at
/etc/init.d/atd start
and the timespec of the directive is placed in /usr/share/doc/at-XX .XX/timespec.gz in the documentation.
The above is how the Linux system uses the at/crontab directive. This article focuses more on the at command. The use of crontab is similar to at.
of Ubuntu killing zombie process If a process ends and the parent process does not wait, it will be
In the Linux command, the chown command can change the owner of the file. Generally, this command is
When Linux backs up the ifcfg-eth0 configuration file, the network fails and the network card cannot
After installing the Solaris system, many users cant log in to Xmanager, and they cant connect to So
Linux using iptables for remote backup/restore
What are the differences between the three load balancing methods of LVS?
How to identify Linux soft links and hard links
Handling of the Segmentation fault error in Linux programming
Linux using the mpstat command method
RedHat/CentOS 7 Steps to Manage the Network Through the nmcli Command
How does the Linux system distinguish between gmtime and localtime
How to install and use Vsftp in Centos system
Linux set swap swap partition steps
How to create a video DVD in a Linux desktop environment
Why can't Windows XP with SP2 install IIS
How to charge for the micro-free toll? Micro-free toll-free phone fee details
The method of judging U disk poisoning
Win8/8.1 Quickly close the desktop super menu operation method
The method of removing the shortcut desktop icon small arrow under windows (winxp/win7)
Win10 can't see the workgroup status prompt "System error 6118" What should I do?
The Lost.dir file solution that appears after Win7 is inserted into the USB flash drive
Latest Win10 Mobile Preview: Cortana and Edge Update