How to run a batch file on a schedule no matter who is logged in.

I need to run a simple batch file that calls to a text file to instructions for WinSCP.

I have set up Windows Scheduler, but have found if a user is not logged on the batch does not run.

So I need a free, simple way of running the batch on a schedule, no matter who is logged in or if no one is logged on.

Thx in advance,
matt
TX_SCUBAAsked:
Who is Participating?
 
AmazingTechConnect With a Mentor Commented:
In your scheduled tasks.

Change the run as user to SYSTEM. No Password.
0
 
DrunkenELFCommented:
If you want that specific bat to run automatically when windows boots, you have a few options, the startup folder is one good and really easy option. However, you can also create a registry (start-run-regedit) key in hklm-software-microsoft-windows-current version-run that points to your batch file. This method is really easier than it seems and will ensure that the batch fille will run automatically no matter who logs in.
0
 
DrunkenELFCommented:
Dear Scuba,
The easiest way in my opinion is to create a scheduled task (the wizard is in the control panel). Choose the batch file you created as the program to run and choose "When my computer starts" as the time to execute.
Cheers!
D-ELF

0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
TX_SCUBAAuthor Commented:
Thanks D-ELF

But I need the bats to run at say 4:00 AM daily and another at 7:00 and another....  and....

~
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
Scheduled task works - if it didn't I wouldn't get my backup notifications.  My backups are run through batch files scheduled through Scheduled Tasks.
0
 
TX_SCUBAAuthor Commented:
Kinda off topic- how do you get your backup logs?
What kind of task due you schedule?

On topic-
Does it work when someone else is logged on?  It runs when I am signed on but does not otherwise.

~
0
 
DrunkenELFCommented:
Hi,
A Timer would be th ideal thing.

create a loop.
C attached example:

U can use ping to create a timed delay
Cheers!
D-ELF

:START
REM Execute the MS-DOS dir command ever 20 seconds.
dir
SLEEP 20
GOTO ENDOR

Open in new window

0
 
StyphonCommented:
If you schedule a task you have the option to run it as a specific user, as if that user was logged on. Set it to run at a specific time and it will run regardless if a user is logged on or not using the credentials you supply it.
0
 
ltlbearand3Connect With a Mentor Commented:
I think you almost have what you need if it is already set up in the Windows Task Schedule.

Open the Task Schedule.
Find your scheduled task
Right click on that task and select Properties
On the Task tab, uncheck the box that states "Run only if logged on"
Now make sure the Run As box has a user set with the correct privileges and has their password assigned.

-Bear
0
 
TX_SCUBAAuthor Commented:
Bear got the goods on how to set a schedule, thanks.  What I need is what AmazingTech is suggesting, running as SYSTEM.  Our passwords change every 45 days so maintaining a host of these jobs is more than I want to carry.

Is there a way to run a Schedule a Job to Run as SYSTEM with Windows XP?

~
0
 
ltlbearand3Connect With a Mentor Commented:
In the Run As box enter
NT AUTHORITY\SYSTEM

That should do the trick

-Bear
0
 
AmazingTechCommented:
In the scheduled tasks run as you only need to put in SYSTEM it will change it to NT AUTHORITY\SYSTEM.
0
 
TX_SCUBAAuthor Commented:
and what is the password I am to use?  I have tryed the local admin with no joy.

~
0
 
AmazingTechConnect With a Mentor Commented:
Leave it blank. No password for SYSTEM or NT AUTHORITY\SYSTEM
0
 
TX_SCUBAAuthor Commented:
Thanks all who helped on this one.  Thanks Amazing for finally being able to get me to understand that the SYSTEM account does not require a password.
~
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.