robmandu
robmandu

Reputation: 193

How to make schtasks work after the user's password has changed?

On Windows machines, schtasks is a utility similar to cron for scheduling jobs to run on a regular basis.

Problem is, when you define a schtask, you must specify the userid and password of the account to run the job.

Then later, when the user changes his password, that schtask will no longer work. It must be deleted and rescheduled with the new password.

So, how can I setup a scheduled job (via schtasks, at, whatever) that's immune to password changes?

Upvotes: 2

Views: 2646

Answers (3)

BlueMystic
BlueMystic

Reputation: 2287

Just add this to your command:

/RU "NT AUTHORITY\SYSTEM" /RP *

Will run as System and ignore passwords.

Upvotes: 1

David Starkey
David Starkey

Reputation: 1840

There is also a way to update existing tasks. In cmd prompt you would use the following to help you:

schtasks /change /tn TaskName [/s computer [/u [domain\]user /p password]] [/tr TaskRun] [/ru [Domain\]User | "System"] [/rp Password]

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/schtasks.mspx?mfr=true

Upvotes: 0

teedyay
teedyay

Reputation: 23521

This doesn't quite answer your question, but a common workaround is to create a user (with appropriate privileges) and use that account solely for executing scheduled tasks.

As the user account is created with a non-expiring password, the sysadmin who creates it should choose an appropriately strong password.

Upvotes: 3

Related Questions