home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d8xx / d801 / cybercron.lha / CyberCron / RexxScripts / CCShow.rexx < prev   
OS/2 REXX Batch file  |  1993-01-24  |  1KB  |  70 lines

  1. /***********************/
  2. /* CCShow.rexx         */
  3. /* 5/1/92 - caw        */
  4. /* based on            */
  5. /* NCShow.rexx         */
  6. /* 7/20/89 - Don Nafis */
  7. /***********************/
  8.  
  9.  
  10. /* Remove the comments below to trace this script. */
  11. /* trace ?r */
  12.  
  13. options failat 20
  14. options results
  15.  
  16. parse arg portname
  17.  
  18. portname = strip(portname, b)
  19. if portname = "" then portname = "CYBERCRON"
  20.  
  21. address value portname
  22.  
  23. 'LIST_EVENTS'
  24. if (result = "") then say "LIST_EVENTS error "
  25. else
  26. do
  27.   eventlist = result
  28.   numwords = words(eventlist)
  29.  
  30.   if (numwords > 0) then
  31.    if (word(eventlist,1) ~= "<None>") then do
  32.  
  33.     say
  34.     version
  35.     say 'CyberCron v'result '- Active Events:'
  36.     say
  37.  
  38.     do j=1 to numwords
  39.       event = word(eventlist,j)
  40.       'SHOW_EVENT '|| event
  41.     eventDisp = result
  42.       if (eventDisp = "") then
  43.         say '->' || event || ' not found.'
  44.       else
  45.         say '->' || eventDisp
  46.     event_next_exec event
  47.     nextexec = result
  48.     if (nextexec ~= '') then
  49.         if (nextexec = 0) then
  50.             say "  will not execute in the future"
  51.         else do
  52.             sssc_to_ascii nextexec
  53.             say "  next execution at" result
  54.         end
  55.     end
  56.   end
  57.   else
  58.   do
  59.     say
  60.     say 'CyberCron has no active events.'
  61.   end
  62.  
  63.   say
  64.  
  65.   'SHOW_STATUS'
  66.     say 'Status: '||result
  67.   say
  68.  
  69. end
  70.