Page 1 of 2
start .exe from 08:00 to 18:00 at every workday
Posted: 23 May 2018 06:20
by sal21
I have in c:\mydir\MyExe.exe
i need to run at every Hour for each workingday, the .exe in dir from 08:00 to 18:00
possible with a batch?
Tks.
sorry for my bad english.
Re: start .exe from 08:00 to 18:00 at every workday
Posted: 23 May 2018 06:28
by Squashman
What's wrong with using Windows Task Scheduler?
Re: start .exe from 08:00 to 18:00 at every workday
Posted: 23 May 2018 06:45
by sal21
no privilege in Windows Task Scheduler....
Re: start .exe from 08:00 to 18:00 at every workday
Posted: 23 May 2018 06:54
by Squashman
How do you expect a program to start automatically at a specific time if you do not have some type of service or daemon running in the background to monitor the time?
Re: start .exe from 08:00 to 18:00 at every workday
Posted: 23 May 2018 07:59
by sal21
Squashman wrote: ↑23 May 2018 06:54
How do you expect a program to start automatically at a specific time if you do not have some type of service or daemon running in the background to monitor the time?
.. i run it for the first time manullay
Re: start .exe from 08:00 to 18:00 at every workday
Posted: 23 May 2018 08:10
by ShadowThief
sal21 wrote: ↑23 May 2018 07:59
Squashman wrote: ↑23 May 2018 06:54
How do you expect a program to start automatically at a specific time if you do not have some type of service or daemon running in the background to monitor the time?
.. i run it for the first time manullay
And then it stays open forever on an infinite loop and you just pray that it never gets closed by accident or the computer reboots?
Re: start .exe from 08:00 to 18:00 at every workday
Posted: 23 May 2018 08:16
by sal21
ShadowThief wrote: ↑23 May 2018 08:10
sal21 wrote: ↑23 May 2018 07:59
Squashman wrote: ↑23 May 2018 06:54
How do you expect a program to start automatically at a specific time if you do not have some type of service or daemon running in the background to monitor the time?
.. i run it for the first time manullay
And then it stays open forever on an infinite loop and you just pray that it never gets closed by accident or the computer reboots?
see in object...
i need to run from 08 to 18, after 18 close bat/application
Re: start .exe from 08:00 to 18:00 at every workday
Posted: 23 May 2018 08:57
by pieh-ejdsch
Hello,
In timed batch file execution this was discussed.
viewtopic.php?f=3&t=8268&p=56092#p54961
Phil
Re: start .exe from 08:00 to 18:00 at every workday
Posted: 23 May 2018 09:50
by Squashman
What do we do if you start the batch file at 7:50 am. Do you want it to wait until 8 am to run any additional code in the batch file?
What do we do if you start the batch file at 8:10 am. Do you want it to run immediately? Then do you want the next instance to run at 9 am or 9:10 am?
Re: start .exe from 08:00 to 18:00 at every workday
Posted: 23 May 2018 09:57
by pieh-ejdsch
@squashman
He wants to start the batch code every hour.
Re: start .exe from 08:00 to 18:00 at every workday
Posted: 23 May 2018 13:53
by ShadowThief
sal21 wrote: ↑23 May 2018 06:45
no privilege in Windows Task Scheduler....

Re: start .exe from 08:00 to 18:00 at every workday
Posted: 24 May 2018 01:09
by sal21
Squashman wrote: ↑23 May 2018 09:50
What do we do if you start the batch file at 7:50 am. Do you want it to wait until 8 am to run any additional code in the batch file?
What do we do if you start the batch file at 8:10 am. Do you want it to run immediately? Then do you want the next instance to run at 9 am or 9:10 am?
Do you want it to wait until 8 am to run any additional code in the batch file? YES!
Then do you want the next instance to run at 9 am or 9:10 am? YES!
note:
good comment!
Squash yoy read in my mind:-)
Re: start .exe from 08:00 to 18:00 at every workday
Posted: 24 May 2018 03:45
by ShadowThief
sal21 wrote: ↑24 May 2018 01:09
Then do you want the next instance to run at 9 am or 9:10 am? YES!
That wasn't a yes/no question. If you start the script at 8:10, should the next instance run at 9:00 or should the next instance run at 9:10?
Re: start .exe from 08:00 to 18:00 at every workday
Posted: 24 May 2018 04:04
by sal21
ShadowThief wrote: ↑24 May 2018 03:45
sal21 wrote: ↑24 May 2018 01:09
Then do you want the next instance to run at 9 am or 9:10 am? YES!
That wasn't a yes/no question. If you start the script at 8:10, should the next instance run at 9:00 or should the next instance run at 9:10?
Sorry...
9:10
Re: start .exe from 08:00 to 18:00 at every workday
Posted: 24 May 2018 09:03
by Squashman
sal21 wrote: ↑24 May 2018 04:04
ShadowThief wrote: ↑24 May 2018 03:45
sal21 wrote: ↑24 May 2018 01:09
Then do you want the next instance to run at 9 am or 9:10 am? YES!
That wasn't a yes/no question. If you start the script at 8:10, should the next instance run at 9:00 or should the next instance run at 9:10?
Sorry...
9:10
So do you see how this can go on and on with us asking questions. I program for a living. If you don't provide enough technical specifications we can't even begin to program such a task.