Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Want to create a client side tool which will start a windows scheduled job, which is on remote server.I don't known how to start scheduled job using some script i had never tried this. if anyone know about it then please help me out.
Posted
Updated 17-Mar-15 22:31pm
v6
Comments
Sergey Alexandrovich Kryukov 16-Mar-15 14:12pm    
Client side of what? Why VBScipt? is is not standard, unlike JavaScript, so it depends on where you use it. Is it WSH, or Web site/application, or what?
—SA

Finally i have solve this question.Here is the code which i created for starting schedule job.

C#
TaskScheduler.TaskScheduler scheduler = new TaskScheduler.TaskScheduler();
            scheduler.Connect(null, null, null, null); //run as current user.

            ITaskFolder root = scheduler.GetFolder("\\");
            IRegisteredTask reg = root.GetTask("taskname");
            IRunningTask runtask = reg.Run(null)
 
Share this answer
 
v4
Use Ajax Call to call scheduled job method.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900