new_perl_user
asked on
Automating Perl Script
Hi,
I want to automate a Perl script to run daily. Right now I am executing it from the command line as
uniserver:/usr/qa/Scripts/ files> ./test.pl filename
where test.pl is the script and the filename is the file it has to process.(like input file)
but when automating how can I call the script with the filename.
I tried it wrap it up in another script as:
#!/usr/bin/perl
do '/usr/qa/Scripts/files> ./test.pl filename'
and call the above script in Cron but it is not working.
I want to automate a Perl script to run daily. Right now I am executing it from the command line as
uniserver:/usr/qa/Scripts/
where test.pl is the script and the filename is the file it has to process.(like input file)
but when automating how can I call the script with the filename.
I tried it wrap it up in another script as:
#!/usr/bin/perl
do '/usr/qa/Scripts/files> ./test.pl filename'
and call the above script in Cron but it is not working.
ASKER
i DID IT JUST NOW AND WAS ABOUT TO REPLY.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I tried earlier the second one but it did not work. will try the first option and will update.
Did the cron job fire? Did the script start?
If the cron job fired and script started but failed, or script proved unstartable root would get a mail about the problem.
If the cron job fired and script started but failed, or script proved unstartable root would get a mail about the problem.
instead of $1 ..use this my $filename=filename