Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Create Scheduled Task using VBScript

Create Scheduled Task using VBScript

Create Scheduled Task using VBScript

I've been struggling with trying to create a scheduled task using VBScript. What I want to do is prompt the user for some inputs, such as the time of day. I can handle that part if I even get a script that works. I need a script that works for recurring (daily m-f) for any time of day, then I can handle user inputs and translating that into the time for the script. I've tried the stock code listed at the bottom of this page https://www.activexperts.com/admin/vbscript-collec... and it doesn't even work - it returns unknown error code #8.

I've come across other examples but they don't schedule a re-ocurring task, only a one time task, which is useless. :(

Can anyone point me in the right direction to create a recurring daily scheduled task at a given time with the action to start a program? I want it to run without highest privileges.

RE: Create Scheduled Task using VBScript

> unknown error code #8

Win32_ScheduledJob was designed to work with the now somewhat aging AT protocol - and the AT protocol was deprecated back in Windows 8, and is nowadays switched off by default (and is the root cause of error 8 that you are seeing). You can switch it back on with the following registry entry(with all the normal caveats about editing the registry):

Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Configuration
Name: EnableAt
Value: 1

but you might be better off looking at the Task Scheduler Scripting Objects instead. it is a little more compledx top use, but there are numerous examples there.

RE: Create Scheduled Task using VBScript

Okay I will look at the Task Scheduler Scripting Objects instead. thank you for the tip !

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close