Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi everyone,
I am new to computing.net, but I must say that some of you already solved some of my problems with their answers to old threads.
I need a batch that will run and close certain applications regarding on predefined Start and Stop time for each day of week.1) I have to set Start and Stop times for each day of week. This data is stored inside batch (I only need to change these times from time to time, so I can change them inside the batch file). For example:
Day Start Stop
Mon 18:20 19:40
Tue 18:20 19:40
Wed - -
Thu 18:20 19:40
Fri 21:40 23:00
Sat 21:40 23:00
Sun 21:40 23:00
1a) Beside these Start and Stop Times, I also need to list all dates when batch should do nothing, regardless the day of week. For example: June 23rd, July 17th, August 11th. These dates are also listed inside the batch file.
2) Now, what I really need this script to do is to:
run A.exe 5 minutes before Start Time;
run B.exe 3 minutes before Start Time;
close B.exe 2 minutes after Stop Time;
shut down PC and closes all applications 10 minutes after Stop time. (Run and Close time should be relative to Start and Stop time, so if I change Start and Stop time for one day, all Run and Close times for applications should change automatically.)The result would be something like this.
Running time for A.exe would be
M,Tu,Th 1815-1950
Wed -
F,Sut,Sun 2135-2310
and running time for B.exe would be
M,Tu,Th 1817-1942
Wed -
F,Sut,Sun 2137-23023) One more thing this script should do is to always check current time to determine if now is 'On' or 'Off' time for each application, and act accordingly. For example, after power failure PC automatically starts on Monday at 19:00, and since this is 'On' time, batch starts A.exe and B.exe, and if current time is StopTime+10min, PC shutdowns.
I hope this is not as complicated as it looks at first sight. If you need any additional info about this script, please ask. For starters, I just want to know if this is doable or not, and on what commands should I focus.
Regards,
Ivan

If you've been reading old posts on this site, then this should sound familiar: Command Scripts and date/time logic do not mix. I suggest you pick a different language for your task.

![]() |
want a book for foxpro 2...
|
To run the java
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |