Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#177743 - 03/09/2003 14:37 Scheduling Tasks
JBjorgen
carpal tunnel

Registered: 19/01/2002
Posts: 3583
Loc: Columbus, OH
Here's a question for you programming gurus...

I need to schedule a task to run in the Windows Task Scheduler programatically. I know under WinNT and Win2k you can just shell out to the AT command or use the NetSchedule api calls. Unfortunately, under WinXP (and I assume win2003 server), unless you have a user setup for the at tasks to run as, they won't run. They sit there in the list looking like they will run, but they won't.

To make matters worse, there doesn't seem to be an easy way to add them under Win98 or ME. (Maybe just copy in the .job file and make sure the Task Scheduler is running at startup in the registry?)

I don't mind popping up a dialog for them to enter the administrator username/pass if needed, but I need for the task to be scheduled and actually run. It has to be possible, Norton does it pretty seamlessly...

Anyone willing to give that one a stab?
_________________________
~ John

Top
#177744 - 03/09/2003 14:41 Re: Scheduling Tasks [Re: JBjorgen]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31578
Loc: Seattle, WA
That's odd. You can't just have the task run under the system account like other services do?

Boy, XP must suck or something.
_________________________
Tony Fabris

Top
#177745 - 03/09/2003 14:45 Re: Scheduling Tasks [Re: tfabris]
JBjorgen
carpal tunnel

Registered: 19/01/2002
Posts: 3583
Loc: Columbus, OH
I tried...AFAIK, you can't.
_________________________
~ John

Top
#177746 - 03/09/2003 17:39 Re: Scheduling Tasks [Re: JBjorgen]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5682
Loc: London, UK
I'm not sure what you're saying. If I run through the wizard, it prompts me for a user ID to run the task as. Are you saying that you enter this and nothing happens, or what?

Or are you specifically having problems with adding tasks programatically? If so, how are you adding them? Scripting? VB, VC++? What?
_________________________
-- roger

Top
#177747 - 04/09/2003 07:01 Re: Scheduling Tasks [Re: Roger]
JBjorgen
carpal tunnel

Registered: 19/01/2002
Posts: 3583
Loc: Columbus, OH
I'm specifially having problems adding them programatically.

I'll use any platform that works, but scripting, VB, or Delphi probably works best. I don't have a VC++ compiler, but I'm sure I could find someone to compile something for me if it came down to it.
_________________________
~ John

Top
#177748 - 09/09/2003 14:45 Re: Scheduling Tasks [Re: JBjorgen]
JBjorgen
carpal tunnel

Registered: 19/01/2002
Posts: 3583
Loc: Columbus, OH
After some looking around, I found a Delphi/C++Builder component that allowed me to automate everything. If anyone is interested, you can find it here. I wrote it so that if they are running XP, I pop up a login box, otherwise, it can add the tasks transparently.
_________________________
~ John

Top