----- Tom Kaminski [MVP] wrote: -----
"Colin Steadman" <an*******@discussions.microsoft.com> wrote in message
news:3C**********************************@microsof t.com...
----- Bob Barrows wrote: -----
Are you talking about SQL Agent scheduled tasks (jobs)? Or batch jobs
scheduled using the AT command? I've just spoken to the customer and asked this question.
The story has changed somewhat. He now says that the job has not yet been
setup, and that he's expecting me to do this bit as well (in whatever way I
feel appropriate). A VBScript would be perfect I think. Can I start a
VBScript and have it run in the background with the credentials of a user of
my choice? TIA
Try something like this: ( I don't remember where I got this from)
Dim oScheduler
Dim objTask
Dim objTrigger
Set oScheduler = CreateObject("Scheduler.SchedulingAgent.1")
Dim TaskName
Set objTask = oScheduler.Tasks.Add("CheckRegistrationReminder")
TaskName = "C:\WINNT\system32\wscript.exe """ & "C:\Program
Files\NellieAdmin\" & "CheckRegistrationReminder.vbs """
objTask.ApplicationName = TaskName
objTask.Comment = "blah blah some comment"
objTask.Creator = "Script File"
objTask.WorkingDirectory = "C:\WINNT\system32"
--
Tom Kaminski IIS MVP
Thanks Tom,
Slight problem with it though. Apparently it needs the task scheduler dll which is only available on Microsoft Site Server 3.0 according to this post:
http://groups.google.com/groups?hl=e...207.126.101.92
Otherwise you get this error:
Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object: 'Scheduler.SchedulingAgent.1'
/ColinsDevArea/tasks.asp, line 46
Any other ideas?
TIA,
Colin