views:

16

answers:

2

I have a perl script that I run from the command prompt: 3 times a day, the problem is now I need to run it every two hours. Im not going to be on an episode of lost so I need some help. Here is the command:

Perl C:/test/scripts/edi.pl

Does anyone know how this above one line command can be made into an executable (.exe) file so I can use the task scheduler to run?

If there is another way to do this with the task scheduler to run once every two hours every day then I could do that as well.

Thanks for your time.

A: 

Can you not simply create a batch file that runs the script, and set that batch file to run every two hours? I know from a quick test there that I can schedule a batch file to run from Task Scheduler on Windows XP at least.

Stephen
Yes its an XP box but im not sure how to make a batch file
Oh, I do apologise. Open up `notepad` and write the line you would normally write into your command prompt. Click File->Save As, and save it as `name.bat`. **Make sure to change the file type to "all types"!**. Then use the task scheduler as described. Though, if webdestroya is right and you can just run the perl script as a straight task, do that I guess! =]
Stephen
Thanks stephen that got it.
A: 

You can actually use the task scheduler to run that exact command without a batch.

The task scheduler should allow you to pass some arguments to the script without a problem (I have done this on a few Windows servers in order to have them run PHP scripts)

webdestroya