Sign in to follow this  
Followers 0
Rex

add / remove a job to ms scheduler using AutoIT

5 posts in this topic

Doe's some on know how to add / remove a job to the ms scheduler.

I have tryed to google, technet

But did't finde any thing that could help me :)

but it seems that something to do with a dll caled mstask.dll, not that i'm sure on it.

All i need it to add a exe to the scheduler, and then show the job list so i can put in when to run, the prog. And ofcource a way to remove the task again.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Doe's some on know how to add / remove a job to the ms scheduler.

I have tryed to google, technet

But did't finde any thing that could help me  :)

but it seems that something to do with a dll caled mstask.dll, not that i'm sure on it.

All i need it to add a exe to the scheduler, and then show the job list so i can put in when to run, the prog. And ofcource a way to remove the task again.

<{POST_SNAPBACK}>

Rex,

I know of two ways to do it:

1. The easy way

Call 'AT.EXE' using Run or RunWait(). For detailed instructions about AT.EXE, just type AT /? in a command prompt.

2. The difficult (COM) way

This requires an additional DLL.

Currently there is only a VBscript example available using this DLL, but it could be easily adapted into AutoIt script.

It's downloadable from:

http://www.microsoft.com/downloads/details...&displaylang=en

(or search for 'VBscript Task Scheduler' at Microsoft)

Regards,

-Sven

Edited by SvenP

Share this post


Link to post
Share on other sites

Rex,

I know of two ways to do it:

1. The easy way

Call 'AT.EXE' using Run or RunWait().  For detailed instructions about AT.EXE, just type AT /? in a command prompt.

2. The difficult (COM) way

This requires an additional DLL.

Currently there is only a VBscript example available using this DLL, but it could be easily adapted into AutoIt script.

It's downloadable from:

http://www.microsoft.com/downloads/details...&displaylang=en

(or search for 'VBscript Task Scheduler' at Microsoft)

Regards,

-Sven

<{POST_SNAPBACK}>

I got my ide from NAV2005, it's doing a form for auto add, and then ticks only run when this user is logged on (a way to by pass the use of password, dont know if this func. works in 2k)

And it was somthing like that i want to do, or maby combine the use of at.exe and then do a open *.job to put in the rest.. Not that i have fount any way to do a open *.job file. It seems that *.job dont has a prog ass to open with :) .

And ofcource no info on that i technet / microsoft... :mad:

The vbscript could be used if however i did understand what i did :D I'm a newbe to AutoIT, and have non understanding of other programing laungage - not that i do understand the lang. of AutoIT yet :evil: but i do my best to solve the problems i stunbel into with the help of the Help file or by searching the forum, rather then rushing to do a new tropic just becorse i hit a wall :D

Share this post


Link to post
Share on other sites

You could use SchTasks.exe. This commandline tool is made for the job.

Share this post


Link to post
Share on other sites

You could use SchTasks.exe. This commandline tool is made for the job.

<{POST_SNAPBACK}>

The problem with schtask.exe is that is commandts is translated to the language of the OS, so if i do a script in my lang(danish) it won't work under other langs. :)

So i have to finde a way to do it so i would work in all lang.

And i do like the way that Nav doe's it cource the user has the abliity to open / change the job manualy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0