----- Tom Kaminski [MVP] wrote: -----
"Colin Steadman" <an*******@disc ussions.microso ft.com> wrote in message
news:3C******** *************** ***********@mic rosoft.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("S cheduler.Schedu lingAgent.1")
Dim TaskName
Set objTask = oScheduler.Task s.Add("CheckReg istrationRemind er")
TaskName = "C:\WINNT\syste m32\wscript.exe """ & "C:\Program
Files\NellieAdm in\" & "CheckRegistrat ionReminder.vbs """
objTask.Applica tionName = TaskName
objTask.Comment = "blah blah some comment"
objTask.Creator = "Script File"
objTask.Working Directory = "C:\WINNT\syste m32"
--
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.Sche dulingAgent.1'
/ColinsDevArea/tasks.asp, line 46
Any other ideas?
TIA,
Colin