[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


Scheduling job to run every 48 hours

  • Create an empty .INI file using Notepad or any text editor
  • Create a new job of the "24x7 script" type.
  • Code something like the following:

Dim count, number,
Dim time_to_run, boolean
Dim process, number

IniFileGetKey( "COUNTER.INI", "Hours", "Count", count )
// increment the counter and check if it is = 48
Add( count, 1, count )
IsEqual( count, 48, time_to_run )

If( time_to_run, RUN, WAIT )

RUN:
   // reset counter
   IniFileSetKey("COUNTER.INI", "Hours", "Count", 0 )
   // lauch program
   run("myprogram.exe", "", process)
   // done, exit
   exit

WAIT:
   // increment the counter in the INI file
   IniFileSetKey("COUNTER.INI", "Hours", "Count", count )

Schedule this job to run "All Day", "Every hour".