Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbscript to .exe to run every 5mins as service

Status
Not open for further replies.

kathleen0220

Programmer
Jan 10, 2012
2
US
Hi,

I just started working for a financial institution and we currently have a .vbs that is sched by task scheduler. The goal is to change it into a service bevause 1. We need it to run forever and 2. We have a monitoring solution that monitors services..not sched tasks. Anyway. Basically this script maps a drive, and copies certain files to another server and then unmaps.

That I have no problem with. The script works great. Packaged with iexpress it also works. Added it to a service using srvany.exe and it works great. But when u start a service the application only runs once. Here is where my problem lies. I need this app to look for files every 5 minutes to forever. I've seen bad things about looping (which I can't get an infinite loop to work as a service anyway) but I don't know my other options and have been staring at webpages and books for quite a while now.

Anyone have suggestions here?
 
Oh, forgot to mention that I already realize most people say use system.timer but my ideal solution would be something I can put into the script before I package it. Visual studio to create a windows service project seems great but im honestly not familiar with it enough to make this simple. This service has to run on a test server before migrating to production.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top