start .exe from 08:00 to 18:00 at every workday

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
sal21
Posts: 22
Joined: 12 Jul 2016 12:58
Location: Italy

start .exe from 08:00 to 18:00 at every workday

#1 Post by sal21 » 23 May 2018 06:20

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.

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: start .exe from 08:00 to 18:00 at every workday

#2 Post by Squashman » 23 May 2018 06:28

What's wrong with using Windows Task Scheduler?

sal21
Posts: 22
Joined: 12 Jul 2016 12:58
Location: Italy

Re: start .exe from 08:00 to 18:00 at every workday

#3 Post by sal21 » 23 May 2018 06:45

no privilege in Windows Task Scheduler....

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: start .exe from 08:00 to 18:00 at every workday

#4 Post by Squashman » 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?

sal21
Posts: 22
Joined: 12 Jul 2016 12:58
Location: Italy

Re: start .exe from 08:00 to 18:00 at every workday

#5 Post by sal21 » 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

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: start .exe from 08:00 to 18:00 at every workday

#6 Post by ShadowThief » 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?

sal21
Posts: 22
Joined: 12 Jul 2016 12:58
Location: Italy

Re: start .exe from 08:00 to 18:00 at every workday

#7 Post by sal21 » 23 May 2018 08:16

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

pieh-ejdsch
Posts: 240
Joined: 04 Mar 2014 11:14
Location: germany

Re: start .exe from 08:00 to 18:00 at every workday

#8 Post by pieh-ejdsch » 23 May 2018 08:57

Hello,
In timed batch file execution this was discussed.
viewtopic.php?f=3&t=8268&p=56092#p54961
Phil

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: start .exe from 08:00 to 18:00 at every workday

#9 Post by Squashman » 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?

pieh-ejdsch
Posts: 240
Joined: 04 Mar 2014 11:14
Location: germany

Re: start .exe from 08:00 to 18:00 at every workday

#10 Post by pieh-ejdsch » 23 May 2018 09:57

@squashman
He wants to start the batch code every hour.

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: start .exe from 08:00 to 18:00 at every workday

#11 Post by ShadowThief » 23 May 2018 13:53

sal21 wrote:
23 May 2018 06:45
no privilege in Windows Task Scheduler....
Image

sal21
Posts: 22
Joined: 12 Jul 2016 12:58
Location: Italy

Re: start .exe from 08:00 to 18:00 at every workday

#12 Post by sal21 » 24 May 2018 01:09

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:-)

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: start .exe from 08:00 to 18:00 at every workday

#13 Post by ShadowThief » 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?

sal21
Posts: 22
Joined: 12 Jul 2016 12:58
Location: Italy

Re: start .exe from 08:00 to 18:00 at every workday

#14 Post by sal21 » 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

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: start .exe from 08:00 to 18:00 at every workday

#15 Post by Squashman » 24 May 2018 09:03

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.

Post Reply