10.9. The Scheduled Commands Module

At jobs (called Scheduled Commands by Webmin) are similar to Cron jobs, but instead of executing repeatedly on a schedule, they run only once at a specified date and time. Unlike Cron jobs, they can be configured to execute in a specific directory instead of the user's home directory. Scheduled commands also keep track of the environment variables that were set when they were created, and make them available to the command when it runs.

Normally the at command is used to create At jobs, the atq command is used to list them, and the atrm command is used to remove them. On Linux, the directory /var/spool/at is used to store jobs—one per file. The daemon process atd, which runs all the time in the background, checks these files and runs them at the appropriate times. If the At daemon is not running, no commands will be run, which may be the case if it is not configured to start in the Bootup and Shutdown module. After a job is run, it is automatically deleted, as it is no longer needed.

The Webmin module for creating and deleting At jobs is called Scheduled Commands, and can be found under the System category. When you enter it, the main page will display a list of commands that are waiting to be run (assuming there are any), and a form for adding a new command. Figure 10.3 shows an example.

Figure 10.3. The Scheduled Commands module.


Any of the commands shown on the main page can be viewed in more detail by clicking on its Job ID. This will take you to a page that shows the full shell script that will be run when the command executes, including all environment variables. For this page, you can cancel the command before it gets a chance to run by clicking the Cancel this command button.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.76.164