I have some scheduled tasks in Windows Task Scheduler (win7) which basically runs a .cmd file which in turn runs an .exe file from one in a minute.
- Task 1 => Execute arquivo1.cmd (arquivo1.exe)
- Task 2 => Execute arquivo1.cmd (arquivo1.exe)
- Task 3 => Execute arquivo1.cmd (arquivo1.exe)
This .exe performs a connection to the external database and performs some operations, there are several tasks running the same file for each execution performs a different query in the database.
The problem is that without explanation, the .exe not connect the external database, the captured error message in the log that is unable to perform the connection to the database server, as if no internet connection but other .exe that perform the same task, continue to run normally (connecting in the same database).
If I delete a task that began to issue and create it again, the .exe works normally, until one day, without explanation, the problem returns.
What I have done:
- When the task stop work, I managed to run the .cmd (.exe) manually (command line) and successfully executed, then let the task scheduler run the task automatically and failed.
- Cranked manual execution of the task (right click, run) and successfully executed, then let the task scheduler run the task automatically and failed.
- I disabled the firewall, the problem persisted.
- I disabled the anti-virus, the problem persisted.
All I can run again excluding the task and creating again (with the same configuration), until one day, without explanation, stop work again.
Any idea what could be?