Re: Perl Script as a Cron Job

2006-10-19 Thread Mazhar
On 10/12/06, Paul <[EMAIL PROTECTED]> wrote: On Wed, October 11, 2006 7:03 am, Mazhar wrote: > Dear All, > > My Code is to ping a range of IP reading from a text file and if they are > not reachable then just write the IP's to a file. Regarding permissions i > am running the same script using

Re: Perl Script as a Cron Job

2006-10-11 Thread Paul
On Wed, October 11, 2006 7:03 am, Mazhar wrote: > Dear All, > > My Code is to ping a range of IP reading from a text file and if they are > not reachable then just write the IP's to a file. Regarding permissions i > am running the same script using root previliges and i am able to run the > scrip

Re: Perl Script as a Cron Job

2006-10-11 Thread Stuart Adams
Mazhar, The cron log is most likely written to /var/log/cron -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Perl Script as a Cron Job

2006-10-11 Thread Mazhar
o:* Beginner *Cc:* beginners perl *Subject:* Re: Perl Script as a Cron Job On 10/11/06, *Beginner* <[EMAIL PROTECTED]> wrote: On 11 Oct 2006 at 17:14, Mazhar wrote: > From the help above i created a new perl code and i was successfull in > running the code by typing the command /scrip

RE: Perl Script as a Cron Job

2006-10-11 Thread Jason Wozniak
ar [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 11, 2006 11:05 AM To: Beginner Cc: beginners perl Subject: Re: Perl Script as a Cron Job On 10/11/06, Beginner <[EMAIL PROTECTED]> wrote: On 11 Oct 2006 at 17:14, Mazhar wrote: > From the help above i created a new perl code an

Re: Perl Script as a Cron Job

2006-10-11 Thread Mazhar
On 10/11/06, Beginner <[EMAIL PROTECTED]> wrote: On 11 Oct 2006 at 17:14, Mazhar wrote:> From the help above i created a new perl code and i was successfull in > running the code by typing the command /scripts/newxxx.pl but the same is> not executed by cron i have the cron entry as below>>  10 * *

Re: Perl Script as a Cron Job

2006-10-11 Thread Beginner
On 11 Oct 2006 at 17:14, Mazhar wrote: > From the help above i created a new perl code and i was successfull in > running the code by typing the command /scripts/newxxx.pl but the same is > not executed by cron i have the cron entry as below > > 10 * * * * /scripts/newxxx.pl This as to be the

Re: Perl Script as a Cron Job

2006-10-11 Thread Mazhar
On 10/11/06, Ken Foskey <[EMAIL PROTECTED]> wrote: On Wed, 2006-10-11 at 16:45 +0400, Mazhar wrote: > I have created the file in Windows and have pasted the entries in HP-UNIX (i > mean copied). I cannot find the command dos2unix in HP UX. > easy check, change command line to this: #!/usr/bin

Re: Perl Script as a Cron Job

2006-10-11 Thread Ken Foskey
On Wed, 2006-10-11 at 16:45 +0400, Mazhar wrote: > I have created the file in Windows and have pasted the entries in HP-UNIX (i > mean copied). I cannot find the command dos2unix in HP UX. > easy check, change command line to this: #!/usr/bin/perl -w to strip the carriage returns try something

Re: Perl Script as a Cron Job

2006-10-11 Thread Mazhar
On 10/11/06, Paul Johnson <[EMAIL PROTECTED]> wrote: On Wed, Oct 11, 2006 at 04:18:04PM +0400, Mazhar wrote: > >On Wed, Oct 11, 2006 at 03:35:03PM +0400, Mazhar wrote: > > > >> 1. If i run the code /scripts/xxx.pl i get the below error... > >> > >> >>>interpreter "/usr/bin/perl" not found > >>

Re: Perl Script as a Cron Job

2006-10-11 Thread Paul Johnson
On Wed, Oct 11, 2006 at 04:18:04PM +0400, Mazhar wrote: > >On Wed, Oct 11, 2006 at 03:35:03PM +0400, Mazhar wrote: > > > >> 1. If i run the code /scripts/xxx.pl i get the below error... > >> > >> >>>interpreter "/usr/bin/perl" not found > >> sh: /scripts/xxx.pl: not found. > i have added /

Re: Perl Script as a Cron Job

2006-10-11 Thread Mazhar
On 10/11/06, Paul Johnson <[EMAIL PROTECTED]> wrote: On Wed, Oct 11, 2006 at 03:35:03PM +0400, Mazhar wrote: > 1. If i run the code /scripts/xxx.pl i get the below error... > > >>>interpreter "/usr/bin/perl" not found > sh: /scripts/xxx.pl: not found. So it would appear that this is not

Re: Perl Script as a Cron Job

2006-10-11 Thread Paul Johnson
On Wed, Oct 11, 2006 at 03:35:03PM +0400, Mazhar wrote: > 1. If i run the code /scripts/xxx.pl i get the below error... > > >>>interpreter "/usr/bin/perl" not found > sh: /scripts/xxx.pl: not found. So it would appear that this is not where perl is found on your system. You need to put th

Re: Perl Script as a Cron Job

2006-10-11 Thread Bjørge Solli
On Wednesday 11 October 2006 13:35, Mazhar wrote: > I did not get the meaning of (Quote properly) http://www.xs4all.nl/~hanb/documents/quotingguide.html When it ways usenet, think email-lists too. -- Bjørge Solli - Office:+47 55205847 Mohn-Sverdrupsenteret, Nansensenteret, Høyteknologisente

Re: Perl Script as a Cron Job

2006-10-11 Thread Mazhar
Dear Thomas, I am running PING from the package Net, can u tell me where can i find the logs of cron jobs as because with that i will be able to check the possibility of not running the script, please Regards Mazhar On 10/11/06, Thomas Bätzler <[EMAIL PROTECTED]> wrote: Mazhar <[EMAIL PROTEC

Re: Perl Script as a Cron Job

2006-10-11 Thread Mazhar
Sorry Solli, Below is the output what u asked for, 1. If i run the code /scripts/xxx.pl i get the below error... interpreter "/usr/bin/perl" not found sh: /scripts/xxx.pl: not found. 2. The first line in the code is below (i have added the Shepang Value) #!/usr/bin/perl I did not get

RE: Perl Script as a Cron Job

2006-10-11 Thread Thomas Bätzler
Mazhar <[EMAIL PROTECTED]> wrote: > My Code is to ping a range of IP reading from a text file and > if they are not reachable then just write the IP's to a > file. Regarding permissions i am running the same script > using root previliges and i am able to run the script maually > but it is fai

Re: Perl Script as a Cron Job

2006-10-11 Thread Bjørge Solli
This is the last top-posted email from you that I will answer.. Please learn how to quote properly! On Wednesday 11 October 2006 13:14, Mazhar wrote: > 1. Is /scripts/.pl the full path name? > Yes the above is the correct path of the script : when i run perl > /scripts/xxx.pl it runs fine So

Re: Perl Script as a Cron Job

2006-10-11 Thread Mazhar
I have set the Shebang in my code to the below #!/usr/bin/perl and below is top of my code below, --- #!/usr/bin/perl use strict; use warnings; use Net::Ping; my $file_name='hostnames.txt'; my $line; my @host_arra

Re: Perl Script as a Cron Job

2006-10-11 Thread Owen Cook
On Wed, Oct 11, 2006 at 03:03:12PM +0400, Mazhar wrote: > Dear All, > > My Code is to ping a range of IP reading from a text file and if they are > not reachable then just write the IP's to a file. Regarding permissions i > am running the same script using root previliges and i am able to run the

Re: Perl Script as a Cron Job

2006-10-11 Thread Mazhar
The Answers are 1. Is /scripts/.pl the full path name? Yes the above is the correct path of the script : when i run perl /scripts/xxx.pl it runs fine 2. Does your script have execute permissions Yes it has execute permissions (i changed it chmod +x for the code file) 3. Does the shebang line

Re: Perl Script as a Cron Job

2006-10-11 Thread Mazhar
Dear All, My Code is to ping a range of IP reading from a text file and if they are not reachable then just write the IP's to a file. Regarding permissions i am running the same script using root previliges and i am able to run the script maually but it is failing if i write the script in cron l

Re: Perl Script as a Cron Job

2006-10-09 Thread Paul Johnson
On Mon, Oct 09, 2006 at 03:23:49PM +0400, Mazhar wrote: > I tried with the below and made my script as executable with chmod command > but the same is not running every 10 minutes. Once you have worked out your crontab syntax, almost all cron problems are due to permissions or environment. > Nee

Re: Perl Script as a Cron Job

2006-10-09 Thread Mazhar
I tried with the below and made my script as executable with chmod command but the same is not running every 10 minutes. Need your help Regards Mazhar On 10/9/06, Hal Wigoda <[EMAIL PROTECTED]> wrote: get rid of the /. On Oct 9, 2006, at 5:55 AM, Mazhar wrote: > When i add the entry as sp

Re: Perl Script as a Cron Job

2006-10-09 Thread Mazhar
When i add the entry as specified i get the below error (i.e) */10 * * * * /scritps/xxx.pl in cron *crontab: error on previous line; unexpected character found in line.* Regards Mazhar On 10/9/06, Jeff Pang <[EMAIL PROTECTED]> wrote: > >I have prepared a script that is to be run as a cron j

Re: Perl Script as a Cron Job

2006-10-09 Thread Jeff Pang
> >I have prepared a script that is to be run as a cron job every 10 minutes, i >have added the same in cron as below, > >*0,10,20,30,40,50 * * * * /scripts/x.pl* > >But the above is not running properly, should i add something in the code. > Try this: */10 * * * * /scritps/xxx.pl The xxx.p

Re: Perl Script as a Cron Job

2006-10-09 Thread Bjørge Solli
On Monday 09 October 2006 11:03, Mazhar wrote: > I have prepared a script that is to be run as a cron job every 10 minutes, > i have added the same in cron as below, > > *0,10,20,30,40,50 * * * * /scripts/x.pl* You have too many stars, remove the leading and trailing stars, or try: */10 * * *