The Linux command at

Source: Internet
Author: User
Tags aliases month name

At [-v] [-Q queue] [-f file] [-MMLBV] Time

At [-v] [-Q queue] [-f file] [-mmlbv]–t time_arg

At–c job[Job ...]

at [-rd] job[job ...]

ATQ [-v] [-Q queue]

ATRM [-v] job[job ...]

Batch

(1). Description

At and batch read the standard input or a specified file, and they will be executed at a later time.

At the specified time to execute the command.

ATQ lists the user's pending jobs (jobs), and if they are superuser, all users ' (pending) jobs will be listed. Output format: Job number, date, hour, queue, and user name.

ATRM deletes the job, identified by the job number.

Batch executes commands when the system load level is allowed, in other words, when the load average drops below 0.8, or the specified value is called in ATD.

At allows for complex time specifications, extending the POSIX.2 standard. It accepts hh:mm forms of time to allow a job at a specific time of day. If the time is past, the next day is assumed. You can also specify midnight midnight, noon noon or teatime afternoon tea time (4PM), and you can use AM, PM to express the allowable time of the morning and afternoon. You can also indicate on which day the job runs, by giving a date with a formal month name and an arbitrary year, or by giving the form MMDDYY, Mm/dd/yy, DD. Mm. YY, the date of YYYY-MM-DD. Date specifications must follow a day's time specification. You can also give the time of the Now + Count Time-units (time unit), the time unit can be minutes (minutes), hours (hours), days (day) or weeks (week), And you can tell the AT command to run the job today or tomorrow by adding a today or tomorrow suffix.

For example: From now three days after four o'clock in the afternoon run the job at 4pm + 3 day, July 31 10 o'clock in the morning run the job at 10am July 31; Tomorrow one o'clock in the morning run the job at 1am tomorrow.

(2). Options

-V Print version information

-Q queue uses the specified queues. The queue name consists of a single letter, and the valid queue name ranges from A to Z and A to Z. At default a queue, batch default B queue. Queues with higher letters run well. The special queue "=" is reserved for a running job. If the job is submitted to a queue specified in uppercase letters, the job is considered to be submitted to batch at the time of the job. Once the time arrives the batch rule will be applied to load balancing in use. If ATQ is assigned to the specified queue, it will display only the pending jobs for that queue.

-M sends a message to the user after the job completes, even if there is no output.

-m do not send mail to users

-f file reads from files instead of standard output

-L ATQ Aliases

-R ATRM Aliases

-D ATRM Aliases

-V Displays the time the job was executed before the job was read. Show Time Grid Example "The 20 14:50:00 1997"

-c marks the jobs listed on the command line as standard output

-T Time_arg the commit time_arg parameter specifies the job run time, format [[Cc]yy] Mmddhhmm

(3). Example

Executing commands with relative time

[[Email protected] Desktop]# ls[[email protected] Desktop]# at now +1 minutesat> echo "@ Now +1 minutes" >1.txt//Do not know the default warranty Where there is, you can only set a at> <EOT>//ctrl+d will directly play <eot>job 4 at 2018-07-21 11:22[[email protected] desktop] # ls1.txt[[email protected] Desktop]# vim 1.txt//Enter into 1.txt to see the output content

Use absolute time to execute commands

[[Email protected] Desktop]# at 12:00at> ls/>2.txtat> <eot>job 5 at 2018-07-21 12:00

View pending jobs and delete useless jobs

View execution details based on job ID

[[email protected] Desktop]# at now +2 minutesat> Echo ' at now +2 minutes ' >3.txtat> job 6 at 2018-07-21 12:11[[em Ail protected] Desktop]# at-c 6#!/bin/sh# atrun uid=0 gid=0# mail root 0umask 22orbit_socketdir=/tmp/orbit-root; Export orbit_socketdirhostname=centos6.8; Export Hostnameimsettings_integrate_desktop=yes; Export Imsettings_integrate_desktopshell=/bin/bash; Export shellxdg_session_cookie=f361f670c8f25b859941a16a00000017-1532137953.618455-100069161; Export xdg_session_cookiehistsize=1000; Export histsizegtk_rc_files=/etc/gtk/gtkrc:/root/.gtkrc-1.2-gnome2; Export gtk_rc_fileswindowid=29360132; Export windowidqtdir=/usr/lib64/qt-3.3; Export Qtdirqtinc=/usr/lib64/qt-3.3/include; Export Qtincimsettings_module=ibus; Export Imsettings_moduleuser=root; Export USER Ls_colors=rs=0:di=01\;34:ln=01\;36:mh=00:pi=40\;33:so=01\;35:do=01\;35:bd=40\;33\;01:cd=40\;33\;01:o R=40\;31\;01:mi=01\;05\;37\;41:su=37\;41:sg=30\;43:ca=30\;41:tw=30\;42:ow=34\;42:st=37\;44:ex=01\;32:\*.tar=01 \;31: \*.tgz=01\;31:\*.arj=01\;31:\*.taz=01\;31:\*.lzh=01\;31:\*.lzma=01\;31:\*.tlz=01\;31:\*.txz=01\;31:\*.zip=01\ ; 31:\*.z=01\;31:\*. z=01\;31:\*.dz=01\;31:\*.gz=01\;31:\*.lz=01\;31:\*.xz=01\;31:\*.bz2=01\;31:\*.tbz=01\;31:\*.tbz2=01\;31:\*.bz= 01\;31:\*.tz=01\;31:\*.deb=01\;31:\*.rpm=01\;31:\*.jar=01\;31:\*.rar=01\;31:\*.ace=01\;31:\*.zoo=01\;31:\*. Cpio=01\;31:\*.7z=01\;31:\*.rz=01\;31:\*.jpg=01\;35:\*.jpeg=01\;35:\*.gif=01\;35:\*.bmp=01\;35:\*.pbm=01\;35:\ *.pgm=01\;35:\*.ppm=01\;35:\*.tga=01\;35:\*.xbm=01\;35:\*.xpm=01\;35:\*.tif=01\;35:\*.tiff=01\;35:\*.png=01\; 35:\*.svg=01\;35:\*.svgz=01\;35:\*.mng=01\;35:\*.pcx=01\;35:\*.mov=01\;35:\*.mpg=01\;35:\*.mpeg=01\;35:\*.m2v= 01\;35:\*.mkv=01\;35:\*.ogm=01\;35:\*.mp4=01\;35:\*.m4v=01\;35:\*.mp4v=01\;35:\*.vob=01\;35:\*.qt=01\;35:\*. Nuv=01\;35:\*.wmv=01\;35:\*.asf=01\;35:\*.rm=01\;35:\*.rmvb=01\;35:\*.flc=01\;35:\*.avi=01\;35:\*.fli=01\;35:\ *.flv=01\;35:\*.gl=01\;35:\*.dl=01\;35:\*.xcf=01\;35:\*.xwd=01\;35:\*.yuv=01\;35:\*.cgm=01\;35:\*.emf=01\;35:\*.axv=01\;35:\*.anx=01\;35:\*.ogv=01\;35:\*.ogx=01\;35:\*.aac=01\;36:\*.au=01\;36:\*.flac=01\;36:\*.mid=01\ ; 36:\*.midi=01\;36:\*.mka=01\;36:\*.mp3=01\;36:\*.mpc=01\;36:\*.ogg=01\;36:\*.ra=01\;36:\*.wav=01\;36:\*.axa= 01\;36:\*.OGA=01\;36:\*.SPX=01\;36:\*.XSPF=01\;36:; Export ls_colorsssh_auth_sock=/tmp/keyring-eg2lua/socket.ssh; Export Ssh_auth_sockgnome_keyring_socket=/tmp/keyring-eg2lua/socket; Export gnome_keyring_socketsession_manager=local/unix:@/tmp/. ice-unix/2251,unix/unix:/tmp/. ice-unix/2251; Export Session_managerusername=root; Export Usernamedesktop_session=gnome; Export Desktop_sessionmail=/var/spool/mail/root; Export Mailpath=/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/root/bin; Export Pathqt_im_module=ibus; Export qt_im_modulepwd=/root/\?\?\?\?\?\?; Export pwd[email protected]=ibus; Export xmodifiersgdm_keyboard_layout=us; Export GDM_KEYBOARD_LAYOUTLANG=ZH_CN. UTF-8; Export langgnome_keyring_pid=2241; Export GNOME_KEYRING_PIDGDM_lang=zh_cn. UTF-8; Export Gdm_langgdmsession=gnome; Export gdmsessionhistcontrol=ignoredups; Export Histcontrolssh_askpass=/usr/libexec/openssh/gnome-ssh-askpass; Export ssh_askpassshlvl=2; Export Shlvlhome=/root; Export homegnome_desktop_session_id=this-is-deprecated; Export Gnome_desktop_session_idlogname=root; Export lognamecvs_rsh=ssh; Export Cvs_rshqtlib=/usr/lib64/qt-3.3/lib; Export qtlibdbus_session_bus_address=unix:abstract=/tmp/dbus-0zcxugk00z,guid=ca2e032461b953e455fa17300000006c; Export dbus_session_bus_addresslessopen=\|\|/usr/bin/lesspipe.sh\%s; Export lessopenwindowpath=1; Export Windowpathg_broken_filenames=1; Export g_broken_filenamesxauthority=/var/run/gdm/auth-for-root-mljqso/database; Export xauthoritycolorterm=gnome-terminal; Export colortermcd/root/\?\?\?\?\?\? | | {echo ' execution directory inaccessible ' >&2exit 1}${shell:-/bin/sh} << ' marcindelimiter09c0b95e ' echo ' at Now +2 minutes ">3.txtmarcindelimiter09c0b95e

  

The Linux command at

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.