home *** CD-ROM | disk | FTP | other *** search
- /***********************/
- /* NC.rexx */
- /* 7/20/89 - Don Nafis */
- /***********************/
-
- /* This script will send the argument supplied by the user to
- NazCron. This must be a vaild NazCron ARexx command. To
- execute from a CLI, copy this script to your REXX: directory
- and type:
-
- rx NC command [parm]
- where command is any valid NazCron command.
- [parm] is the parameter for commands which
- require parameters.
-
- Examples:
-
- rx NC list_events ==> displays the names of all named events
- rx NC unlock_events ==> tells NazCron to resume examining the
- S:CRONTAB file
-
- rx NC new_event_file ram:newcron
- ==> NazCron will stop processing events from
- the old CRONTAB file and start processing
- those from "ram:newcron"
-
- rx NC shutdown ==> terminates NazCron processing
-
- rx NC add_event hithere * * * * * echo >ram:echo "hi there"
- ==> adds the event named "hithere" to the event
- list. This event will execute the echo
- command each minute, putting the string
- "hi there" in the file ram:echo.
- */
-
- /* Remove the comments below to trace this script. */
- /*--->trace results<---*/
-
- options failat 20
- options results
-
- arg doit
- if (doit == '') then
- do
- say
- say ' Usage: rx NC command [parm]'
- say
- exit 20
- end
-
- say
-
- address NAZCRON
- doit = upper(doit)
- doit
- if (rc ~= 0) then
- say 'NazCron command: '||doit||' failed with return code: '||rc
- else
- do
- say 'NazCron command: '||doit||' was successful'
- eventlist = result
- if (eventlist ~== 'RESULT') then
- do
- say 'Result:'
- say eventlist
- end
- /*
- * Show the result of the above command.
- */
- if (doit ~= 'SHUTDOWN') then
- do
- 'SHOW_STATUS'
- if (rc ~= 0) then
- say 'NazCron command: SHOW_STATUS failed with return code: '||rc
- else
- say 'Status: '||result
- end
- say
- end
-