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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

automation

Status
Not open for further replies.

damann

Technical User
Jul 19, 2000
114
US
Hey guys I have a script that when ran checks to see if there are any files in a folder and delete them, also moves certain files from another folder to another. How can I automate this so that Perl does this on its own without me manually invoking it? [sig][/sig]
 
hi,

what platform you runing on? unix? windows? [sig]<p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br> [/sig]
 
Windows platform.......... [sig][/sig]
 
Ok I found the cron program for Windows. Is there any other way of doing this besides using cron? [sig][/sig]
 
There is always another way......after all the Perl mantra is 'There is more than one way to do it'. I'm more of UNIX geek, but, I have seen system services setup on Win boxes to do what you're trying to do. ?Why not use the cron app'. you refer to above?

Alternatively, you could write a brief piece of Perl that would start what ever you want started and put it in your startup folder. This would have the disadvantage of permanently sucking up some resources and keeping them.

#!perl
while (1) {
system(&quot;RunThis.pl&quot;);
sleep 3600;
}


Put what ever you want done on a routine basis in 'RunThis.pl' and adjust you sleep interval to what you want. Again, I think this is probably the most expensive way to do this trick.

Good Luck..... [sig]<p> <br><a href=mailto: > </a><br><a href= > </a><br> keep the rudder amid ship and beware the odd typo[/sig]
 
Thanks to you all.... [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top