Thank you for the replies. I'm running the task in task scheduler using the same account credentials that I'm able to run the batch file successfully manually. Any other suggestions?
I think we need more info at this point.
What are you trying to run? And how?
It sounds like a permissions problem to me- depending on where the script is stored, and what you're trying to do (edit:syntax), and also- what you've got the settings as.
If this is a domain pc- there may be a GPO that is preventing the task from being ran. (Edit:Group policy can even block administrators from running scripts on their own pc's- that's what domain control from top level- is all about)
Or you've got some setting that needs adjusting on the task itself.
By default, the tasks will run from the system account.
Is it executing at all, even if you force it?
Does it give you an error? What does the event log say?
Is it set for run whether user is logged in or not?
Is the task enabled?
Check conditions tab. Make sure it's set appropriately for laptop/ac power.
With my scheduled tasks, I generally just have it run a .bat file I've already made.
If it's something on a server itself- best to run with a (Edit: a domain) service account that has the needed permissions.
(Edit: Take a look at your script- and also check what groups your account belong to as well as the computer account- if on a domain.
Windows has its own caveats- but even domain controllers have authority over local policy- GPOS - they do block even admins- from running their own scheduled scripts locally... their computers have to be in the right OU and have their own appropriate- GPO, in that respect Windows is actually- fairly secure.)