Jump to content
ken82m

UDF For Windows Task Schedulder

Recommended Posts

ken82m

I know this can be done with some command line stuff.

But I was just wondering if anyone has or knows of maybe a UDF for interacting with the task scheduler.

I searched the help file and forum but didn't come up with anything new.

Thanks,

Kenny


My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Share this post


Link to post
Share on other sites
Andreik

I know this can be done with some command line stuff.

But I was just wondering if anyone has or knows of maybe a UDF for interacting with the task scheduler.

I searched the help file and forum but didn't come up with anything new.

Thanks,

Kenny

If you have some time and you want to do this, you can write an UDF for Task Scheduler. :P


When the words fail... music speaks

Share this post


Link to post
Share on other sites
dbzfanatic
ken82m

lol thank you great one lol :P

I'll give it a try :(

Kenny


My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Share this post


Link to post
Share on other sites
dbzfanatic

Ok let me know if it works,things seemed fine here but I only have one comp to test on and what may work by fluke here might throw an error there >.>

Try not to die before you test it :P otherwise i'll have to say "oh my God! they killed kenny!" XD sorry.

Edit: face didn't show up >.>

Edited by dbzfanatic

Share this post


Link to post
Share on other sites
ken82m

Killed me?! you got that right smoke started coming out of the computer when I hit run script lol :(

It worked like a charm thanks :P

I wish I understood COM, apperantly task scheduler has it's own interface you can use.

I found something in PERL but no help there lol

Kenny


My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Share this post


Link to post
Share on other sites
dbzfanatic

OMG IT WORKED?! I'm glad it did, I've never written a UDF before so I'm really glad it worked. I don't really understand COM either but I'll look into it soon. Is there a link you can give me to the COM info?

Share this post


Link to post
Share on other sites
ken82m

Here's a bunch of 1.0 examples on MSDN :P

There are 2 versions of the API apperantly.

ver. 2.0 only works on vista, ver. 1.0 works on previous versions and on vista.

http://msdn.microsoft.com/en-us/library/aa382078(VS.85).aspx

Here's a PERL utility I found, if someone understands it maybe they could convert it.

http://sourceforge.net/projects/taskscheduler/

-Kenny

Edited by ken82m

My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Share this post


Link to post
Share on other sites
dbzfanatic

Well I see the link for the perl script and I checked MSDN but it doesn't seem to have any info I can use (maybe I'm just not looking in the right place(s) but I couldn't find anything).

Share this post


Link to post
Share on other sites
ken82m

would have been nice if I gave you the link lol

I added it above (http://msdn.microsoft.com/en-us/library/aa382078(VS.85).aspx)


My Contributions _StringMultiReplace PC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs Script - IT Help Desk and System Information Tool - Set On Lid Close Power Option - Streaming Media Server & Website "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Share this post


Link to post
Share on other sites
dbzfanatic

Well I found that already but it didn't show me the object I needed to get or create,just action. I was informed about this http://www.microsoft.com/technet/scriptcen...04/hey0922.mspx in my UDF thread in the example scripts forum. I think I've found what I need to do but that remains to be seen. I also updated my UDF with a standard version (capable of being submitted if someone thinks it's good enough, I personally don't right now but I also don't know the user base that this UDF could/would have so if enough people want/need it I won't stop someone from submitting it) so it's a bit more readable and easier to understand from the function headers.

Share this post


Link to post
Share on other sites
mrmacadamia

hi, how can i create a task scheduler with autoit?

Simply put, how can I run the task scheduler with autoit?

What I know that i can run it by

Run(@comspec & " /c Start %SystemRoot%\explorer.exe ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{D6277990-4C6A-11CF-8D87-00AA0060F5BF}")

but I want it to open it directly to create a task.

Share this post


Link to post
Share on other sites
rajeshontheweb

shell.open will openthe folder with the guid u entered

and MS posts this WMI example which can be easily traqnslated to autoit..

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
errJobCreated = objNewJob.Create _
    ("Cleanup.exe", "********123000.000000-420", _
        True , 1 OR 4 OR 16, , , JobID) 
Wscript.Echo errJobCreated

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

×