Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howtos:general_admin:task_scheduling [2015/06/24 18:44 (UTC)]
tdrssb
howtos:general_admin:task_scheduling [2015/06/24 19:36 (UTC)] (current)
tdrssb
Line 27: Line 27:
 job 4 at 2015-06-22 12:01  job 4 at 2015-06-22 12:01 
 darkstar:​~% ​ darkstar:​~% ​
 +</​code>​
 +
 +=====File-driven at=====
 +Commands can also be contained within a file and run by **//at//**:
 +<​code>​
 +darkstar:~% at 12:32 -m -f /​usr/​local/​bin/​my_script.sh
 +warning: commands will be executed using (in order) a) $SHELL b) login shell c) /bin/sh
 +job 8 at 2015-06-22 12:10
 +</​code>​
 +The **-m** flag will email the user after completion of the command; the **-f** flag specifies the command will read the job from a file, not from standard input. After the command is typed in (and the appropriate warning is displayed), the **//at//** job number((As distinct from a process ID (PID) known to the operating system)) is displayed.
 +
 +=====at Internal Scheduling=====
 +The job numbers provided after a command is typed in, or when a file is read, allow the user to know which internal job will be run in sequential order. If a user wants to delete a specific task, all that needs to be known is this internal job number. To remove the job, the command **//​atrm//​** (**__at__ __r__e__m__ove**) is used:
 +
 +<​code>​
 +darkstar:​~% ​ at -l
 +7      2015-06-22 12:10 p tux
 +8      2015-06-22 12:15 p root
 +</​code>​
 +
 +The command **//atq//** (**__at__ __q__ueue**) is the same as **//at -l//**:
 +
 +<​code>​
 +darkstar:​~% ​ atq
 +7      2015-06-22 12:10 p tux
 +8      2015-06-22 12:15 p root
 +</​code>​
 +
 +To remove the user job, use **//​atrm//​** with the job number:
 +<​code>​
 +darkstar:​~% ​ atrm 7
 </​code>​ </​code>​
  
Line 81: Line 112:
 </​note>​ </​note>​
  
- +**//​anacron//​** is unique from **//​cron//​** ​in the respect that it does not expect the operating system ​to be running continuously like a 24x7 server. If the time of execution passes while the system is turned off**//​anacron//​** executes the command automatically when the machine is turned back on. The reverse is **not** true for **//​cron//​** - if the computer is turned off during the time of scheduled execution, **//​cron//​** will not execute the job. Another key difference between **//​anacron//​** and **//​cron//​** is the minimum chronological "​granularity"​ - **//​anacron//​** can only execute jobs by //day//, versus the ability of **//​cron//​** ​to execute by the //minute//Finally, **//​anacron//​** can __only__ be used by root, while **//​cron//​** can be used by root and normal users.
- +
-<​note>​ +
-The links in red are to non-existent articles. +
- +
-If you are experienced with those toolsplease feel free to write the articles. +
-</note>+
  
 ====== Sources ====== ====== Sources ======

In Other Languages
QR Code
QR Code howtos:general_admin:task_scheduling (generated for current page)