New plan task

xiaoxiao2021-03-06  40

Scheduled Tasks

description

Run the Notepad program to run at 12:30 pm every Monday, Wednesdays and Friday.

Script code

StrComputer = "."

Set objwmiservice = getObject ("WinMgmts:" _

& "{ImpersonationLevel = Impersonate}! //" & strComputer & "/ root / cimv2")

Set objnewjob = objwmiservice.get ("win32_scheduledjob")

Errjobcreated = ObjnewJob.create_

("Notepad.exe", "******** 123000.000000-420", _

True, 1 or 4 or 16,, JobID)

Wscript.echo errjobcreated

转载请注明原文地址:https://www.9cbs.com/read-67484.html

New Post(0)