Just to give a little background as someone may have a better idea. I developed a program that displays photos in fullscreen. It cycles through files in a folder that our Marketing team populates. The program then runs on a TV's through our many location. The program is on a network location. Occasionaly if the network goes down or the wifi becomes slow the program stops working as it can't pull the images.
So I have a .bat file that stops a program, then starts it backup.
taskkill /f /im tvs.exe
TIMEOUT /T 3
Echo "Restarting TV Program"
TIMEOUT /T 3
START C:\Users\rise\Desktop\TVApplication.lnk
I have created a Task Scheduler with the following properties:
Run on login
Delay for 2 Minutes
Repeat Every 4 Hours
Action is start the batch file
When I restart the computer. It runs the .bat file but the START action never start the program. If I run the .bat file manually without the Scheduler it runs just fine. After I run it manually once, when the task scheduler runs after 4 hours it works perfect.
So the only issue that Im running into is that when the computer boots up, the START program part of the .bat file never works properly.
What I have tried:
If I right click on the schedule and do a Run, the Start Action doesn't happen.
I changed the repeat every from 4 hours to 5 minutes. I let it run for 4-5 times and the START program never happens.
It only runs correctly if I run the .bat file first, then the repeats in the schedule work fine.