Windows – Task Scheduler is not executing the program

scheduled-taskswindows 7

Problem:

I have a .bat to send me an email with an attachment. When I execute it in cmd or in Windows Explorer, it works and I receive my email within 3-5 sec. I scheduled a task for its execution daily, but when the trigger occurs, the only thing I can see is a black window popping up called tasksend or something like that and that's it. When I check the task scheduler for my task, it is tagged as executed successfully. No error messages. Yet, I don't have my Email.

System Configuration:

E528-2821 Windows 7 32-bit

What I tried:

It suggested to:

  1. check the tick box [Run with highest Privileges]
  2. adding the scheduled task in the Startup folder
  3. check the tick box [Run only when user is logged on]
  4. setting the Start In path manually (under the Action properties)
  5. In addition to 4, using a path that did not contain spaces

None of them worked.

It suggested to change something about the Local Group Policy. However the Local Group Policy Editor feature is not included in the Windows 7 Starter, Home Basic, and Home Premium editions.

This is an alternative to Windows Task Scheduler I downloaded, but it gives me the same problem.

Best Answer

As @psycogeek suggested, I made the scheduled task spawn out the execution of the bat file to a log.txt file. I did this by adding > log.txt in the parameter field of the scheduled task.

Apparently, the difference between a manual launch and a scheduled launch was that blat didn't remember its configuration. As such, I had to add in the .bat file before the execution of blat, blat -install again with all its parameters.

Related Question