Computing.Net > Forums > Programming > Task scheduler

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Task scheduler

Reply to Message Icon

Name: Ivan2304
Date: June 21, 2009 at 04:09:23 Pacific
OS: Microsoft Windows XP Home Edition
CPU/Ram: 1.893 GHz / 511 MB
Subcategory: Batch
Comment:

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-2302

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



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: June 22, 2009 at 07:10:05 Pacific
Reply:

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.


0

Response Number 2
Name: Ivan2304
Date: June 22, 2009 at 08:54:12 Pacific
Reply:

Thanks Razor,
I'll try something else


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


want a book for foxpro 2... To run the java



Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Task scheduler

Batches and Task Schedulers www.computing.net/answers/programming/batches-and-task-schedulers/11829.html

VBscrip Schedule Task www.computing.net/answers/programming/vbscrip-schedule-task/17156.html

Batch scripts/Scheduled Tasks www.computing.net/answers/programming/batch-scriptsscheduled-tasks/17448.html