Scheduler function
In the previous post here, we saw how to monitor the ping function.
There is another use case, which requires to execute ping function at a particular time of day.
To perform this function, we extend the monitor capability to setup a scheduler.
Scheduler function
- Set the time in Excel sheet
Sub Set_Schedule_Time()
ActiveSheet.Range("F15").Value = "Scheduled"
Application.OnTime TimeValue(ActiveSheet.Range("F14").Value), "Ping"
End Sub
Sub Reset_Schedule_Time()
ActiveSheet.Range("F15").Value = "Not Scheduled"
Application.OnTime EarliestTime:=TimeValue(ActiveSheet.Range("F14").Value), _ Procedure:="Ping", Schedule:=FalseEnd Sub
Checkout the next post about scheduler here