How to create a scheduled task using Task scheduler in WIndows 10 to pin a host .
Here is my pingserver.bat and contain is as per below .
echo %DATE% %TIME% >> pingserverout.txt
ping usamplehost.com >> pingserverout.txt
echo “ — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -” >> pingserverout.txt
I want to run this batch file every 5 minutes , let’s achieve this using Task scheduler in WIndows 10.
Type Task scheduler in windows menu to open it .
Then right click on Task scheduler and click new task , select values as per the image
Click Triggers tab and enter the details as per below and click OK , feel free to customize is according to your wish .
Click Actions tab and click New .
In the action window select Start a program.
Enter the full path of batch file to the program/script path C:\Users\sdesilva2\Downloads\pingserver.bat
In Start in optional field enter the file location , excluding the file name .
C:\Users\sdesilva2\Downloads
You can leave the other tabs as it is and click Ok.
After that every five minutes the job will run and the batch file get executed , and output of the batch file will be generated in C:\Users\sdesilva2\Downloads location .