Scheduled Tasks

  • Thread starter Thread starter Jasper Recto
  • Start date Start date
J

Jasper Recto

I 'm trying to set up a task that runs reports and prints them out on
different printers. I have created a batch file that will execute the task.
When I go to the command line and run that task (e.g. d:\batchreports.bat),
everything works great.

Now, when I create a scheduled task using the at command, it doesn't work.
I look at the logs and there is an entry for when it starts but never an
entry for when it finishes. Why is this not working?

The AT command I'm using is:

at 20:00 /interactive /every:MTWThF d:\batchreports.bat

Any help would be greatly appreciated
 
Jasper Recto said:
I 'm trying to set up a task that runs reports and prints them out on
different printers. I have created a batch file that will execute the task.
When I go to the command line and run that task (e.g. d:\batchreports.bat),
everything works great.

Now, when I create a scheduled task using the at command, it doesn't work.
I look at the logs and there is an entry for when it starts but never an
entry for when it finishes. Why is this not working?

The AT command I'm using is:

at 20:00 /interactive /every:MTWThF d:\batchreports.bat

Any help would be greatly appreciated

It would be useful if you quoted the contents of batchreports.bat.
 
The contents of the batch file is an executable to run a custom procedure
that prints out reports from our manufacturing software:

V:\Progress\bin\prowin32.exe V:\Vantage\db\vantage.db -ininame
V:\Vantage\vantage.ini -pf V:\Vantage\db\vantage.pf -N TCP -H loc-vntg -S
epic52 -ld vantage -p "v:\Report Procedures\Batch\BatchProcedure.p"

It works when I run the batch file from a command prompt.

Thanks,
Jasper
 
Jasper said:
The contents of the batch file is an executable to run a custom procedure
that prints out reports from our manufacturing software:

V:\Progress\bin\prowin32.exe V:\Vantage\db\vantage.db -ininame
V:\Vantage\vantage.ini -pf V:\Vantage\db\vantage.pf -N TCP -H loc-vntg -S
epic52 -ld vantage -p "v:\Report Procedures\Batch\BatchProcedure.p"

It works when I run the batch file from a command prompt.

Thanks,
Jasper

Is V: a local drive or a network share?
 
Jasper Recto said:
The contents of the batch file is an executable to run a custom procedure
that prints out reports from our manufacturing software:

V:\Progress\bin\prowin32.exe V:\Vantage\db\vantage.db -ininame
V:\Vantage\vantage.ini -pf V:\Vantage\db\vantage.pf -N TCP -H loc-vntg -S
epic52 -ld vantage -p "v:\Report Procedures\Batch\BatchProcedure.p"

It works when I run the batch file from a command prompt.

Thanks,
Jasper

Now modify your batch file like so, then examine the two output
files. This will most likely illustrate why Phil Robyn asked if V:
was a local or a networked drive.

V:\Progress\bin\prowin32.exe V:\Vantage\db\vantage.db -ininame
V:\Vantage\vantage.ini -pf V:\Vantage\db\vantage.pf -N TCP -H loc-vntg -S
epic52 -ld vantage -p "v:\Report Procedures\Batch\BatchProcedure.p"
1>c:\test.log 2>c:\test.err

Remember that jobs scheduled by at.exe run under the System
account. If you need access to networked resources, used the
Task Scheduler and specify an account that has appropriate
access to drive V:.
 
Is the MVP suffix to your name a recent recognition of your
vast talents? If so, welcome on board!
 
Pegasus said:
Is the MVP suffix to your name a recent recognition of your
vast talents? If so, welcome on board!

Yes it is, and thank you very much!
 
It is a network drive!


Phil Robyn said:
Is V: a local drive or a network share?


--
Phil Robyn
Univ. of California, Berkeley

u n z i p m y a d d r e s s t o s e n d e - m a i l
 
I added a line to map the V: drive in my batch statement. It still doesn't
print but in my Scheduled Task logs, it actually says that it finishes.
Before it would only have a statement that the batch started and not
finished.

I think it might be because it needs to connect to the printer. How do
connect to a shared printer using a command?

Thanks,
Jasper
 
net use lpt2: \\SomeServer\SomeSharedPrinter


Jasper Recto said:
I added a line to map the V: drive in my batch statement. It still doesn't
print but in my Scheduled Task logs, it actually says that it finishes.
Before it would only have a statement that the batch started and not
finished.

I think it might be because it needs to connect to the printer. How do
connect to a shared printer using a command?

Thanks,
Jasper
 
Pegasus said:
Is the MVP suffix to your name a recent recognition of your
vast talents? If so, welcome on board!

I forgot to mention in my other reply: actually, my talents
are only half-vast. ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top