Task Scheduler with Same EXE (daing)

A

AGP

My issue is fairly simple. I have a built an executable that runs a process.
it does not accept any command line switches, it just runs a process every
day at 2am. Well I built this into the task Scheduler to run every day at
2am. However I may be gone for several days and when I come back only the
first task has been run and I can see the GUI is displayed on my desktop.
Not until I close the GUI does the scheduler run the next schedule. How can
I make it so that the same EXE gets run at 2am regardless if I close out the
GUI or not. I just cant figure it out.

In the end what i need is if i am on vacation and gone for a week that the
scheduler runs every day at 2am the same EXE and there will be 5 instances
of my app displaying on the desktop.

AGP
 
T

Terry R.

On 12/18/2007 3:57 PM On a whim, AGP pounded out on the keyboard
My issue is fairly simple. I have a built an executable that runs a process.
it does not accept any command line switches, it just runs a process every
day at 2am. Well I built this into the task Scheduler to run every day at
2am. However I may be gone for several days and when I come back only the
first task has been run and I can see the GUI is displayed on my desktop.
Not until I close the GUI does the scheduler run the next schedule. How can
I make it so that the same EXE gets run at 2am regardless if I close out the
GUI or not. I just cant figure it out.

In the end what i need is if i am on vacation and gone for a week that the
scheduler runs every day at 2am the same EXE and there will be 5 instances
of my app displaying on the desktop.

AGP

If you can't fix the executable to close the GUI, schedule to reboot the
machine at 4 AM each day. That should force a close.

--
Terry R.

***Reply Note***
Anti-spam measures are included in my email address.
Delete NOSPAM from the email address after clicking Reply.
 
E

Elmo

AGP said:
My issue is fairly simple. I have a built an executable that runs a process.
it does not accept any command line switches, it just runs a process every
day at 2am. Well I built this into the task Scheduler to run every day at
2am. However I may be gone for several days and when I come back only the
first task has been run and I can see the GUI is displayed on my desktop.
Not until I close the GUI does the scheduler run the next schedule. How can
I make it so that the same EXE gets run at 2am regardless if I close out the
GUI or not. I just cant figure it out.

In the end what i need is if i am on vacation and gone for a week that the
scheduler runs every day at 2am the same EXE and there will be 5 instances
of my app displaying on the desktop.

AGP

If you ran the program from a batch file, you could possibly set it to
close from there.. I don't know the details on how that'd be done though.
 
A

AGP

Thanks for the tips guys. But the hitch isn that I need the GUI open
so that I can see what data was processed. This works just fine if I create
several different items, say one for each day. I get an instance of an
application
per task. But that beats the automation since I would have to constantly
revise it.
Ive also tried a batch file but that stays open until the GUI is closed,
which again I need displayed so that I can see what data was processed.

AGP
 
T

Terry R.

On 12/18/2007 5:57 PM On a whim, AGP pounded out on the keyboard
Thanks for the tips guys. But the hitch isn that I need the GUI open
so that I can see what data was processed. This works just fine if I create
several different items, say one for each day. I get an instance of an
application
per task. But that beats the automation since I would have to constantly
revise it.
Ive also tried a batch file but that stays open until the GUI is closed,
which again I need displayed so that I can see what data was processed.

AGP

The issue isn't with the scheduler, it's with your program. It can't run
multiple instances. Can you pipe the output to a text file (say with
the current days date) and then have it close?

--
Terry R.

***Reply Note***
Anti-spam measures are included in my email address.
Delete NOSPAM from the email address after clicking Reply.
 
A

AGP

The issue isn't with the scheduler, it's with your program. It can't run
multiple instances. Can you pipe the output to a text file (say with the
current days date) and then have it close?


sure it can. i can double-click the exe multiple times at various times say
10 minutes apart and they will all fire with a different instance. This is
why
im confounded as how to run it every morning and have the interface
displayed
for every subsequent run. Again if i make a different task for each morning
then
a different instance gets fired no problem. the challenge is to do this with
a single
schedule item.

AGP
 
P

Poprivet`

AGP said:
sure it can. i can double-click the exe multiple
times at
various times say 10 minutes apart and they will all
fire
with a different instance. This is why
im confounded as how to run it every morning and have
the
interface displayed
for every subsequent run. Again if i make a different
task for each morning then
a different instance gets fired no problem. the
challenge
is to do this with a single
schedule item.

AGP

What was wrong with using Restarts? Seems like a
simple solution if the machine is running reliably.
 
T

Terry R.

sure it can. i can double-click the exe multiple
times at
various times say 10 minutes apart and they will all
fire
with a different instance. This is why
im confounded as how to run it every morning and have
the
interface displayed
for every subsequent run. Again if i make a different
task for each morning then
a different instance gets fired no problem. the
challenge
is to do this with a single
schedule item.

AGP

What was wrong with using Restarts? Seems like a
simple solution if the machine is running reliably.
[/QUOTE]

I thought so too, but he said he needed to read the output on the
screen. I suggested he pipe the output to a text file (each with the
current days date), but maybe he can't accomplish that.


--
Terry R.

***Reply Note***
Anti-spam measures are included in my email address.
Delete NOSPAM from the email address after clicking Reply.
 
T

Terry R.

On 12/18/2007 9:36 PM On a whim, AGP pounded out on the keyboard
sure it can. i can double-click the exe multiple times at various times say
10 minutes apart and they will all fire with a different instance. This is
why
im confounded as how to run it every morning and have the interface
displayed
for every subsequent run. Again if i make a different task for each morning
then
a different instance gets fired no problem. the challenge is to do this with
a single
schedule item.

AGP

If you can't pipe the output to a file (as I suggested), then I guess
that only while you're on vacation you will have to create a task for
each day you're gone. Seems if you can create a program to display
output on a screen, you could also output it to a file.

--
Terry R.

***Reply Note***
Anti-spam measures are included in my email address.
Delete NOSPAM from the email address after clicking Reply.
 
W

w.ian.stuart

If I understand correctly, what's happening is that because the
program is not terminating Task Scheduler consider the task to still
be running when it's next scheduled instance comes round and therefore
does not try and run the task again. You could try scheduling seperate
tasks for the days you are away rather than one recurring task. Test
this with a few seperate tasks 5 minutes apart to see if it works.
 
A

AGP

I thought so too, but he said he needed to read the output on the screen.
I suggested he pipe the output to a text file (each with the current days
date), but maybe he can't accomplish that.

rebooting the machine to run another task seems overkill here. also when i
reboot
the interface will be gone when it gets to the desktop. although I can do
numerous
things with the output inlcuding output to a text file (which by the way i
already do)
the point of my challenge here is to see the multiple instances of the
interface for quick
scanning. if the task scheduler is not designed to fire off another instance
unless the
prior one has been closed then I should probably try another approach. I
just thought
that the sheduler should somehow be able to do this but it appears it cant.
probably my
next step will be to create another timer app that is active all the time
and will fire
off the instances. thanks for all the tips and if you guys have any more
ideas let me
know.

AGP
 
A

AGP

If I understand correctly, what's happening is that because the
program is not terminating Task Scheduler consider the task to still
be running when it's next scheduled instance comes round and therefore
does not try and run the task again. You could try scheduling seperate
tasks for the days you are away rather than one recurring task. Test
this with a few seperate tasks 5 minutes apart to see if it works.

yes that works as I have already tried that. however this is not automating
a task since I have to constantly
update the scheduler. i was hoping that i could just set it and forget it
and not worry about checking my machine
if I am not there for vacation or if im called to another location.

AGP
 
H

HeyBub

AGP said:
Thanks for the tips guys. But the hitch is that I need the GUI open
so that I can see what data was processed. >

No you don't. Have the application write a time-stamped record to a log file
containing the pertinent details. Review the file at leisure.
 
A

AGP

HeyBub said:
No you don't. Have the application write a time-stamped record to a log
file containing the pertinent details. Review the file at leisure.

sure I do. i dont want to go into details of why i need to see the GUI but
suffice to say that
the text output is there for me to review. the GUI is there however for
other purposes including but
not limited to a quick scan of what was processed, what processes need to be
rerun, etc.
the point is that I need to see the GUI.individual scheduled tasks make this
possible but not with
one single sheduled task that runs every morning. I could write a script
that generates the tasks for each morning
run but to me it seems like there should be an option in the scheduler that
lets another instance run even though the
last one is still active. Two different schedule items work but not one. Ill
try something else, i think
ive seen a freeware scheduler that does this. ill write back with my
findings.


AGP
 
W

w.ian.stuart

yes that works as I have already tried that. however this is not automating
a task since I have to constantly
update the scheduler. i was hoping that i could just set it and forget it
and not worry about checking my machine
if I am not there for vacation or if im called to another location.

AGP


OK, here's another suggestion for you.

Schedule the task to run a batch file that uses the START command to
launch your application. I've just tested this quickly using a single
task to launch Notepad and it works the way you require. Batch file c:
\Windows\launcher.bat, one line in batch file - "start notepad",
scheduled to run every minute, result = new instance of notepad
launched every minute without requiring previous instances to be
terminated.
 

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

Top