Batch: schedule text file to open

March 7, 2009 at 12:57:34
Specs: Windows XP
I'm trying to create a batch that will setup a scheduled task. The task would bring up a text file everyday for me to read.

I have a line within my batch that uses the AT.EXE to place a scheduled task.
That line is:

at 15:30 /every:M,T,W,Th,F,S,Su "NOTEPAD.EXE C:\Reminders\reminder.txt"

However, the scheduled task doesn't bring up the text file for me to read when it reaches the correct time and date.

I do see the task that was created in windows. I've experimented with various versions of "NOTEPAD.EXE C:\Reminders\reminder.txt", but with success. I feel certain that my problem could be here, but I'm not sure what I'm doing wrong.

See More: Batch: schedule text file to open

Report •

March 7, 2009 at 15:07:49
Nevermind, I found that I need to use SCHTASKS.EXE instead of AT.EXE

It works great, but it's a little more complex. It does the job once you figure out all the quirks, and it took me a little bit of time to get the time/day issues working without errors.

Report •

March 7, 2009 at 23:12:17
Yes, the AT is quirky. In my tinkering with it, I get the impression that you need to be explicit.

For instance, it will schedule, but won't run, a batch that's in the path unless you give a fully qualified path. [I think M$ stold that from Novell.]

For instance:

at blabla my.bat

won't work; but this will:

at blabla c:\util\my.bat

try this:

at 15:30 /every:M,T,W,Th,F,S,Su "c:\winnt\NOTEPAD.EXE C:\Reminders\reminder.txt"

[or wherever your notepad is]

If at first you don't succeed, you're about average.


Report •

March 10, 2009 at 12:32:54
Thanks for the tip! That was one scenario that I didn't try to make it work correctly.

Report •

Related Solutions

Ask Question