Listing Scheduled Scripts

Currently scheduled scripts are noted in the SYSSCHEDULE table in the default database (usually /usr/local/morph3/texis/testdb or c:\morph3\texis\testdb). This table is created automatically when needed. To list schedules, the -listsched or -ls command-line option may be used. This option lists the currently scheduled scripts, their schedules, and when each is to be run next, in ascending order of next-run time. A typical listing of texis -ls might be:

Next run    Schedule                     Script
in 26 sec   every 10 minutes             /usr/scripts/logchk
in 5h 10m   daily at 12am                /usr/scripts/walksite
in 8d 9h    monthly on first sun at 4am  /usr/scripts/logchk/monthly.txt

The /usr/scripts/logchk script is to be run every 10 minutes; it checks the most-recent logs for errors. Once a night at midnight a new Web site index is generated by the /usr/scripts/walksite script; this will be run next in 5 hours and 10 minutes. Finally, once a month on Sunday the <monthly> function of the /usr/scripts/logchk script is run to rotate Web server logs. An optional script name may be given after -ls to print information for just that script.

Alternatively, the -LS option prints schedule information with greater detail. Running this with an optional script name, e.g. texis -LS /usr/scripts/logchk/monthly.txt, we might see:

Script:    /usr/scripts/logchk/monthly.txt
Schedule:  monthly on first sun at 4am
Next run:  2004-04-01 04:00 (in 8d 9h)
Last run:  2004-03-04 04:00 (19d 15h ago) took 5m 13s with exit code 3
First run: 2004-02-04 04:00 (47d 15h ago)
Status:    runnable, 2 executions, last istag, id 3ab671c8107
Comments:  Rotates logs once a month

This also tells us the last time the script was run, how long it took, that it exited with an error code of 3, and that its purpose is to rotate error logs.

Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.