i'm trying to schedule a job to run on wednesdays at 14:00.
i'm using the following code, but the job is not created on the scheduled jobs under system tools.
what could be the problem?
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
errJobCreated = objNewJob.Create _
("lead_backup.exe", "********123000.000000-420", _
True , 4, , , JobID)
i'm using the following code, but the job is not created on the scheduled jobs under system tools.
what could be the problem?
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
errJobCreated = objNewJob.Create _
("lead_backup.exe", "********123000.000000-420", _
True , 4, , , JobID)