Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 796
robmandu Avatar asked Feb 02 '26 00:02

robmandu


2 Answers

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.

like image 92
teedyay Avatar answered Feb 04 '26 01:02

teedyay


Just add this to your command:

/RU "NT AUTHORITY\SYSTEM" /RP *

Will run as System and ignore passwords.

like image 35
Jhollman Avatar answered Feb 04 '26 00:02

Jhollman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!