dslreports logo
 
    All Forums Hot Topics Gallery
spc
Search similar:


uniqs
748
activoice
join:2008-02-10
York, ON

activoice

Member

[Windows] Scheduled task on event but leave time between runs?

I use one of my windows PC's to download, sometimes when it is under heavy load it loses the network connection, and can not connect to DNS, so I always see event 1014 in the logs.

The only way that I have found to restore the network connection when this happens is to reboot the PC, so I created a task that runs on Event 1014 to reboot the PC.

But sometimes event 1014 might occur because the DNS is actually unavailable or there are problems with the internet connection to my ISP. I don't want the PC constantly rebooting when this happens is there a way to schedule this task so that if it happens again to leave like 2 hours or something like that between runs?

Camelot One
MVM
join:2001-11-21
Bloomington, IN

Camelot One

MVM

You could use task manager to trigger a script file that would check a last run log file before running the reboot function.

But there is probably an easier way.
JoeSchmoe007
Premium Member
join:2003-01-19
Brooklyn, NY

JoeSchmoe007

Premium Member

Script suggestion is correct. It can be easily done in PowerShell. Right before reboot output date/time to the file. Then each time script is triggered read date/time from that file and don't reboot unless at least 2 hours has passed.

exocet_cm
Writing
Premium Member
join:2003-03-23
Brooklyn, NY

exocet_cm to activoice

Premium Member

to activoice
What about a different approach and run a script that utilizes a PING command to determine connectivity?