I have changed my script to point to several batch scripts on the local server that each run a different scheduled task. I have then created a new user and given that user administrator rights to the server and changed my script to use run as:. Depending on the option selected in the script depends on which batch job and consequently which scheduled task is run.
The downside is it prompts for a password although I have set it to save credentials after its asked for each task for each person that runs it , would rather be able to change the access to run the scheduled task directly instead of having to us runas and enter a password to run a batch script to in turn run the scheduled task but at least this workaround is working. To continue this discussion, please ask a new question. Get answers from your peers along with millions of IT pros who visit Spiceworks.
Hi guys, Hoping someone can help, I want to be able to run a batch file which will in turn run a selected scheduled task on a server however having permission issues. If I add the user to the local administrator group on the server then it works fine. Best Answer. Verify your account to enable IT peers to see that you are a professional. The batch file in question should not start Task1.
Sorry for not being specific earlier. OraAff That's fine, you just need to run a scheduled task for the line of code I put above, instead of the individual tasks, unless I'm not following you? Show 8 more comments. Sign up or log in Sign up using Google. Sign up using Facebook.
Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. For most tasks, the default settings are good. Once you know how to schedule tasks, the mind can race with ideas of things to automate.
You can auto delete files , set favorite programs to open on login , or automatically clear the print queue of failed jobs. Whatever task you do repeatedly, you can probably script it and schedule it.
Guy has been published online and in print newspapers, nominated for writing awards, and cited in scholarly papers due to his ability to speak tech to anyone, but still prefers analog watches. Read Guy's Full Bio. We hate spam too, unsubscribe at any time. Table of Contents. Subscribe on YouTube! Did you enjoy this tip? We cover Windows, Mac, software and apps, and have a bunch of troubleshooting tips and how-to videos.
This is especially true for advanced tasks. For example, I wanted to automatically delete files and folders in a given folder after I log into the system. You cannot do that directly with the task scheduler. So, I created a batch script and used the task scheduler to execute that batch file on schedule. Just follow the below steps to schedule a batch file in Task Scheduler in Windows. Scheduling a batch file with Task Scheduler is way easier than you think.
0コメント