[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

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

Link to this comparison view

Next revision
Previous revision
howtos:software:at [2012/12/31 01:53 (UTC)] – created mfillpothowtos:software:at [2015/04/14 01:47 (UTC)] (current) – Last URL was cut by a newline character didierspaier
Line 1: Line 1:
 +<!-- Reviewed 2013-10-16 mfillpot -->
 <!-- Add your text below. Start with a Headline (see button bar above). --> <!-- Add your text below. Start with a Headline (see button bar above). -->
 ====== at - Task Scheduling ====== ====== at - Task Scheduling ======
Line 10: Line 11:
 The following commands are included to monitor the **at** command: The following commands are included to monitor the **at** command:
   * **at** - The program used to submit a one-time task.   * **at** - The program used to submit a one-time task.
-  * **atq** - The program used to review the queue of jobs submitted with **at**.+  * **atq** - The program used to review the queue of jobs submitted with **at** 
 +.
   * **atrm** - The program used to remove jobs from the at queue.   * **atrm** - The program used to remove jobs from the at queue.
  
Line 16: Line 18:
 The **at** command can be issued to allow you to write a custom script or The **at** command can be issued to allow you to write a custom script or
 point it to a pre-built script. In addition, the broad time specifications point it to a pre-built script. In addition, the broad time specifications
-allowed increase the complezity.+allowed increase the complexity.
  
 The //-m// argument can be added to any command telling the daemon to mail The //-m// argument can be added to any command telling the daemon to mail
Line 48: Line 50:
 within the prompt, upon completion you close the prompt with the within the prompt, upon completion you close the prompt with the
 <key>Ctrl</key>+<key>'d'</key> <key>Ctrl</key>+<key>'d'</key>
 + 
 The command above instructed **at** to ping google 4 times at 7:40PM, return The command above instructed **at** to ping google 4 times at 7:40PM, return
 the application status and e-mail the results to the user. the application status and e-mail the results to the user.
Line 63: Line 65:
 user@darkstar$ atq user@darkstar$ atq
 4 Sun Dec 30 19:40:00 2012 a user 4 Sun Dec 30 19:40:00 2012 a user
 +</code>
 +
 +Once the task number has been noted you can review the commands that are
 +included in the job by issuing the command //at -c {jobnumber}//, and example is shown below.
 +
 +<code>
 +user@darkstar$ at -c 4
 +#!/bin/sh
 +# atrun uid=1000 gid=1000
 +# mail user 1
 +umask 22
 +....Environment Details....
 +cd /home/user || {
 +   echo 'Execution directory inaccessible' >&2
 +   exit 1
 +}
 +ping -c 4 www.google.com
 +echo $?
 +
 </code> </code>
  
Line 82: Line 103:
  
 <!-- If you copy information from another source, then specify that source --> <!-- If you copy information from another source, then specify that source -->
-<!--  * Original source: [[http://www.linux.com/learn/tutorials/261878-intro-to-slackware-package-management|Linux.com]] -->+<!--  * Original source: [[http://www.linux.com/learn/tutorials/261878-intro-to- 
 +slackware-package-management|Linux.com]] -->
  
 <!-- Authors are allowed to give credit to themselves! --> <!-- Authors are allowed to give credit to themselves! -->
Line 88: Line 110:
  
 <!-- Please do not modify anything below, except adding new tags.--> <!-- Please do not modify anything below, except adding new tags.-->
-<!-- You must also remove the tag-word "template" below. Otherwise your page will not show up in the Table of Contents -->+<!-- You must also remove the tag-word "template" below. Otherwise your page wil 
 +not show up in the Table of Contents -->
 {{tag>howtos task_scheduling author_mfillpot}} {{tag>howtos task_scheduling author_mfillpot}}
  
 howtos:software:at ()