Windows Task Scheduler Automation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I work for a company with 500 technicians in the field with laptop computers
and I am looking for something simple I can use to go and create a scheduled
task on their machines with Windows Task Scheduler. To be more detailed I
plan to have a tiny access database zipped up on the network for them to
download. When they open the zip it will place an Access database on their
local drive with a shortcut on their desktop. When they click the shortcut it
will then open the database for the first time and the database will go and
write a sceduled task in windows task scheduler to open itself every day
around 8:00am. Upon completion of creating this new Scheduled task the
database would then delete the shortcut. And the rest is pure automation...
So in short I am looking for some vba code that I can place in access to have
a database go and create a scheduled task for itself. Any thoughts on this
would be great. Thanks Take Care & God Bless - Sparker
 
Well, here's the gen on the task scheduler:

http://msdn.microsoft.com/library/d...skschd/taskschd/task_scheduler_start_page.asp

I believe (but have not checked) that it exposes an API that you could
use from any suitable client, eg. Access. You just have to find out
what APIs exist, which ones you will need, & how to translate those
into Access VBA. Ie. more reading, then more questions!

Presumeably you have a database component to what you need to do? If
not, ie. if you just have to establish a few pre-determined task
entries, you could probably do it from a VBS script.

The code required to use the task scheduler APIs from Access, & the
code required to do it from a VBS script, would probably be identical,
except the variables are "typed" in the former (eg. Dim N as Integer),
and "untyped" in the latter (just Dim N).

HTH,
TC
 
Oops! I didn't notice that, thanks for pointing it out.

So OP, you should search for the docs on the current version of the
APIs. They would be in MSDN somewhere.

Cheers,
TC
 
Back
Top