Support Forums

Task Scheduler

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.
User avatar
devereux0110
Posts: 31
Joined: Thu Aug 31, 2006 4:34 am

Task Scheduler

Postby devereux0110 » Thu Nov 12, 2015 7:21 am

We have a script which basically reads through a csv files of student usernames and resets the password in AD to default password, the script functions with no problem if I run it manually on the DC and writes to a txt that password is reset for which user and then the CSV file is deleted.
The script then runs in a loop pausing for 30 seconds and then checking for another CSV File then pausing for 30 seconds and so on until 10pm at night before the script Quits.

The CSV file comes from another script which teachers run to automate reset students passwords.

We are Server 2012 R2
We added a Scheduled Task to run this automatically each morning at 7am to complete the automation of reset students passwords which have done previously on Server 2003 years back.
The task runs a 7am and writes to the txt file as though it as reset the password but it doesn't actually reset the password like it does if we run the script manually.

If the server is logged on with an account when the scheduled task starts it works, if it is not logged on with anyone, the scheduled task starts writes to the log files but doesn't reset the passwords, the task schedule is set to run weather a user is logged on or not and run in highest privileges but unless the user is logged on at the start time of the task, it doesn't reset the passwords.

Once the task is successfully running the server can be logged off and it continues to work, does anyone have any idea why this may happen
User avatar
jvierra
Posts: 9698
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Task Scheduler

Postby jvierra » Thu Nov 12, 2015 8:12 am

This does not appear to be a script issue. It is likely that you need to redefine your task and be sure it is working as needed.
If you have issues with the task scheduler post in the Microsoft forum for WS2012R2 for assistance.
User avatar
devereux0110
Posts: 31
Joined: Thu Aug 31, 2006 4:34 am

Re: Task Scheduler

Postby devereux0110 » Thu Nov 12, 2015 2:48 pm

Posted here because I thought may be others that have run scripts this way may have had the same issue.

The script does work when run manually when logged on, just not when server is logged off and run by task scheduler, thought maybe something needed adding to the script to make it work correctly with server in logged off state
User avatar
jvierra
Posts: 9698
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Task Scheduler

Postby jvierra » Thu Nov 12, 2015 4:13 pm

The issue is with the scheduler which is very different in WS2012. Ask the script author to help you set it up correctly for your script.

Return to “VBScript”

Who is online

Users browsing this forum: No registered users and 3 guests