# Solved: Scheduled Task: Running Script on Command Prompt



## Drummerboy84 (Jun 10, 2004)

Is there a way to run a certain command from the command prompt and set it to run as a scheduled task every day?

Example: I wan to run - start/b c:\fnsw\bin... everyday at 3:00.

- I am running Windows 2000

Thanks,
~Jeremy


----------



## vinaur (Aug 24, 2003)

I don't know about Windows 2000, but I suspect it would be the same or very similar as windows XP. Put the command in a batch file (.bat) and schedule a task to run every day at w/e time you want. To schedule a task go to Control Panel/Scheduled Tasks and click on "Add Scheduled Task". Again, this I'm working on XP, so it might not be exactly that.


----------



## ghostdog74 (Dec 7, 2005)

Drummerboy84 said:


> Is there a way to run a certain command from the command prompt and set it to run as a scheduled task every day?
> 
> Example: I wan to run - start/b c:\fnsw\bin... everyday at 3:00.
> 
> ...




```
at 3:00 start /b c:\fnsw\bin.....
```


----------



## Drummerboy84 (Jun 10, 2004)

Ok. I have made a .BAT file that launches the program. The problem is, once the program runs, it does not stop until I kill it from the task bar. 

Is there a way to create an other .bat file to run and terminate the program?

- Once the .bat runs, it launches the program; so the .bat is finished as soon as it runs (pretty much)
- The only way to control the launch of the program is through the command prompt which I am doing via the .bat.

Thanks for the help!

~Jeremy


----------



## goldhat (Aug 12, 2007)

well one way to kill a program or terminate is by this


TASKKILL /IM PROCESSNAME

TSKILL PROCESSNAME


----------



## JohnWill (Oct 19, 2002)

Run it without the START command, when the batch terminates, the window will close. I have several batch jobs that run on a schedule, and I just stick the commands directly in the .BAT file bare.


----------



## Drummerboy84 (Jun 10, 2004)

Thanks goldhat. It works great.


----------

