scripting@wanadoo.nl




atDeleteAllJobs()

http://www.scriptlogic.com/kixtart/FunctionLibrary_FunctionList.aspx


actual FunctionLibrary list on 'Scriptlogic' site printer-friendly mirror of UDF topic on 'scripting@wanadoo.nl' site close
24 February 2003 atDeleteAllJobs()
AuthorFlorian Lagg, ICQ 167357108
Action Deletes all scheduled Jobs on a specific host.
SyntaxatDeleteAllJobs ($sComputer) 
Parameters
  • $sComputer (Required / String) Hostname of remote Computer or "" for localhost 
  • Remarkson NT 4.0 install WMI 
    Returns-1 = error: WMI probably not installed or
    -2 = error: WMI query for scheduled jobs fails or
    -4 = error: delete of at least one Job failed 
    DependenciesWMI must be installed on NT 4.0. Win 2000 and XP have it installed.
    Uses: atGetJobs(), atDeleteJob() 
    Examples
    atDeleteAllJobs ("") ; deletes all jobs on localhost
    
     
    Source
    FUNCTION atDeleteAllJobs ($scomputer)
      $retval = 0
      $arrjobs = atgetjobs($scomputer)
      IF $arrjobs <> 0
        FOR EACH $job IN $arrjobs
          $err = atdeletejob($scomputer, $job.jobid)
          IF $err <> 0
            $retval = -4
          ENDIF
        NEXT
        $atdeletealljobs = $retval
      ELSE
        $atdeletealljobs = $arrjobs
      ENDIF
    ENDFUNCTION ; - atDeleteAllJobs -
     
      original source of UDF topic. show actual FunctionLibrary list on Scriptlogic site close top
              printer-friendly mirror of UDF topic on scripting@wanadoo.nl site  




    Copyright © 2003 www.scriptlogic.com & scripting@wanadoo.nl - last updated on 20 May 2003


    Site Meter