'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' The format of a cron command is very much the V7 standard, with a number of
' upward-compatible extensions. Each line has five time and date fields.
' TaskGhost scripts are executed when the minute, hour, and month of year
' fields match the current time, and when at least one of the two day fields (day
' of month, or day of week) match the current time.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'' This is the main CRON table.
'' You will add one line for each 'job' you wish to schedule
'' Just print something every minute.
If TGCtrl.CheckTime (0, tc, "* * * * *") = true Then TGCtrl.Print ("Do job1") '' Run the bleep.vbs script synchronously every second (extended cron)
If TGCtrl.CheckTime (2, tc, "* * * * * * * *") = true Then TGCtrl.Run 0, "bleep.vbs", "*Bleep (S)*"
'' Run the bleep.vbs script asynchronously every second (extended cron)
If TGCtrl.CheckTime (4, tc, "* * * * * * * *") = true Then TGCtrl.Run RUN_ASYNC, "bleep.vbs", "*Bleep (A)*"
'' Run the bleep.vbs script synchronously every second and print the return value.
'' The test.vbs will spawn another script in another thread and capture the return value.
If TGCtrl.CheckTime (3, tc, "* * * * * * * *") = true Then TGCtrl.Print TGCtrl.Run (0, "test.vbs", "CCCCCCCCCCCC")
'' Run the "hello world" script every minute. - Prints Hello World in a tight loop. yet
'' TaskGhost continues to execute.
If TGCtrl.CheckTime (5, tc, "* * * * *") = true Then TGCtrl.Run RUN_ASYNC, "hello.vbs", vbNullString
'' Run the "hello world" script on the hour.
If TGCtrl.CheckTime (6, tc, "0 * * * *") = true Then TGCtrl.Run RUN_ASYNC, "hello.vbs", vbNullString
'' Run the "hello world" script Mon-Fri at 0430 (04:30AM).
If TGCtrl.CheckTime (7, tc, "30 4 * *") = true Then TGCtrl.Run RUN_ASYNC, "hello.vbs", vbNullString
'' Run "nothing.exe" at Mon, Wed, Fri at 1930 (7:30PM).
If TGCtrl.CheckTime (8, tc, "30 19 * * 2,4,6") = true Then TGCtrl.Run 0, "CreateProcess.vbs", "c:\bin\nothing.exe"
'' Run "nothing.exe" 'As User' Xmas morning at 0900 only (9:00AM).
If TGCtrl.CheckTime (9, tc, "0 9 25 12 *") = true Then TGCtrl.Run 0, "CreateProcessAsUser.vbs", "c:\bin\nothing.exe"