busiCrontab.pl
415 Bytes
use warnings;
use strict;
my $NOTICE_HOME="/yfbnms/masteragent/notice";
my $SCRIPT_HOME="/yfbnms/masteragent/script";
my $dir="$NOTICE_HOME/busi";
my $exec_shell;
my $file;
my @dir;
opendir(DIR,$dir) or die "can��t open the dir";
@dir=readdir DIR;
foreach $file (@dir) {
if( $file=~m/.sh/ ) {
$exec_shell="$SCRIPT_HOME/busi/$file";
print "$exec_shell\n";
system("nohup sh $exec_shell > /dev/null &");
}
}