[an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] 24x7 Script Archive


Schedule 24x7 Scheduler automatic restart

Method 1 (24x7 Scheduler v2.0 and up)

// Create new "script type" job. Select ob Automation Language for the script type.
// Copy and paste the following script. Set the job schedule as desired.

Dim old_pid, number
Dim new_pid, number

ProcessGetID "24x7.exe", old_pid
Run "24x7", "", new_pid
ProcessKill old_pid

Method 2 (This method is more reliable but requires 24x7 Scheduler v3.1 and up)

// Create new "script type" job. Select ob Automation Language for the script type. Make sure the job is not run detached.
// Copy and paste the following script. Set the job schedule as desired.

Dim old_pid, number
Dim new_pid, number

Call "kernel32.dll", "GetCurrentProcessId", "uu", True, 0, old_pid
Run "24x7", "@V"24x7_home"", new_pid
ProcessKill old_pid