I would like to run a batch file in background every 10 minutes. I know I can use a scheduled tasks to run a batch file, but how to run in in background - without batch window to appear?
You could try using "CS" a tool in the WIndows Resource kit. It will make any executable (so probably will work on a batch script) a service, which can be started, stopped, and set to run automatically when you boot... like a service, in fact!
Haven't tried it with a batch script, but I have been led to believe it would work. Give it a try...
First install rktools from microsoft, then look for reference to CS in the documentation, or type "CS /?" at the command prompt for instructions on usage.
Of course even if it does work that way, you may still get the annoying command window popping up... I'd be interested to know how you get on with it!
If you're doing it through scheduled tasks why not just set your task scheduler service to log on as the local system account under task scheduler properties on the logon tab and make sure that "allow service to interact with desktop" is NOT checked?
1. Right click on "my computer"
2. Select manage from the list that appears
3. Under "services and applications" hilight services
4. From the list of services highlight "task scheduler"
5. Right click on task scheduler and select "properties"
6. On the "log on" tab, select "local system account" as the account to log on as
7. Immmediately below the "local system account" line is an option to "allow service to interact with desktop". Make sure that this is NOT checked.
No probs! Good luck!
We install the Resource Kit as standard build on Servers here, as there are lots of very useful tools, so I often figure others do as well.
In fact, as far as I know you don't have to install anything for the tools, you just need to extract which ones you want and copy to a directory on the server.
I don't know. I've never used a VBS script for it. I tend to go route that takes the least time.
For security purposes, the server should be locked down so that only admins have access to the scheduled task folder and the services (inlcuding task scheduler) so if you're worried about access or someone changing it there shouldn't be a problem. I run various tasks during the day and noone ever knows their running. Sometimes I even forget until I get an email containing the log file, or whatever else is produced, for whatever task I've run.
If you don't have the option to "allow service to interact with desktop" checked then I'm sorry, I don't know what else to suggest. I've never had a problem running it as a service. I can log on and off the server at will while the task is running without even knowing its running.
You are running the bat file through an AT command that you created through the scheduled task wizard, aren't you? You need to "call" the bat file using the AT command.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.