trouble with CRON

I am having a problem getting a CRON job to run in LINUX 6.1.

I added this line to my crontab using crontab -e logged in as root.

0 0 * * * ps -ef |awk '$8=="./ezproxy" {print "kill -9 " $2}' | sh; cd
/usr/local/ezproxy; ./ezproxy &

This line worked on other LINUX and UNIX installations. It also works from
the command prompt.
It fails to run.

Any ideas???
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
SHROYECL [ Di, 16 April 2002 14:24 ] [ ID #539 ]

Re: trouble with CRON

At 05:24 AM 16/04/2002, Shroyer-Matchan, Cherie (SHROYECL) wrote:
>I am having a problem getting a CRON job to run in LINUX 6.1.
>
>I added this line to my crontab using crontab -e logged in as root.
>
>0 0 * * * ps -ef |awk '$8=="./ezproxy" {print "kill -9 " $2}' | sh; cd
>/usr/local/ezproxy; ./ezproxy &
>
>This line worked on other LINUX and UNIX installations. It also works from
>the command prompt.
>It fails to run.
>
>Any ideas???

Any error logs? Check your root mail, or better yet, add an alias in
/etc/aliases for "root: YourNormalUserID" and run newaliases.

Make sure there are no blank lines in your crontab, use # for spacing lines
and no blank line at the end of the file. If this is the case, you should
at least get an error message from the cron daemon in root's email.

One last thing, you might want to make this a script and have cron run the
script, instead of a bunch of piped commands in your crontab file.

HTH

Scott.

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Scott Taylor [ Di, 16 April 2002 17:12 ] [ ID #542 ]

Re: trouble with CRON

One other thing to realize is that cron doesn't run
..profile or .bashrc. Sometimes your PATH, as well as
other variables, needs to be setup.

--- "Shroyer-Matchan, Cherie (SHROYECL)"
<SHROYECL [at] UCMAIL.UC.EDU> wrote:
> I am having a problem getting a CRON job to run in
> LINUX 6.1.
>
> I added this line to my crontab using crontab -e
> logged in as root.
>
> 0 0 * * * ps -ef |awk '$8=="./ezproxy" {print "kill
> -9 " $2}' | sh; cd
> /usr/local/ezproxy; ./ezproxy &
>
> This line worked on other LINUX and UNIX
> installations. It also works from
> the command prompt.
> It fails to run.
>
> Any ideas???
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-admin" in
> the body of a message to majordomo [at] vger.kernel.org
> More majordomo info at
http://vger.kernel.org/majordomo-info.html


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Kyle [ Di, 16 April 2002 17:26 ] [ ID #543 ]

RE: Re: trouble with CRON

If the process has been up for more than 24 hrs then the awk positional parameter for ezproxy would be wrong. It would be $9 instead of $8

you could try: ps -ef | grep [e]xproxy | awk '{print "kill......

Kyle <kb57442 [at] yahoo.com> wrote:

> One other thing to realize is that cron doesn't run
>.profile or .bashrc. Sometimes your PATH, as well as
>other variables, needs to be setup.
>
>--- "Shroyer-Matchan, Cherie (SHROYECL)"
><SHROYECL [at] UCMAIL.UC.EDU> wrote:
>> I am having a problem getting a CRON job to run in
>> LINUX 6.1.
>>
>> I added this line to my crontab using crontab -e
>> logged in as root.
>>
>> 0 0 * * * ps -ef |awk '$8=="./ezproxy" {print "kill
>> -9 " $2}' | sh; cd
>> /usr/local/ezproxy; ./ezproxy &
>>
>> This line worked on other LINUX and UNIX
>> installations. It also works from
>> the command prompt.
>> It fails to run.
>>
>> Any ideas???
>> -
>> To unsubscribe from this list: send the line
>> "unsubscribe linux-admin" in
>> the body of a message to majordomo [at] vger.kernel.org
>> More majordomo info at
>http://vger.kernel.org/majordomo-info.html
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Tax Center - online filing with TurboTax
>http://taxes.yahoo.com/
>-
>To unsubscribe from this list: send the line "unsubscribe linux-admin" in
>the body of a message to majordomo [at] vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>


____________________________________________________________ ______
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop [at] Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
johnjulian1 [ Di, 16 April 2002 19:06 ] [ ID #544 ]

Re: trouble with CRON

on "4-16-2002" "Shroyer-Matchan, Cherie (SHROYECL)" writ:

: I added this line to my crontab using crontab -e logged in as root.
:
: 0 0 * * * ps -ef |awk '$8=="./ezproxy" {print "kill -9 " $2}' | sh; cd
: /usr/local/ezproxy; ./ezproxy &


The first form of this command is used to install a new
crontab from some named file or standard input if the
pseudo-filename ``-'' is given.

.... from my reading of it, a cron entry is looking for a 'named' file,
rather than, a string of commands ...


--
.... i'm a man, but i can change,
if i have to , i guess ...


-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
terry white [ Mi, 17 April 2002 10:08 ] [ ID #550 ]

Re: Re: Re:

N 0 w the L 0 W E S T P R l C Es ON:

C l A L l S
C l A L l S S 0 F T
V l A G R A
V l A G R A S 0 F T
V l A G R A P R 0 F E S S l 0 N A L
L E V l T R A

also:
V A L l U M, H u m a n G R 0 W T H H 0 r m 0 n e, H 0 0 D IA, L l P 0 S A F E, Z 0 V l R A X, N Y M P H 0 M A X, D l F L U C A N, A V A N D l A and many many others...

check all P r l C E s by C L l K l N G the L l N K:

http://vcufrl.litevison.com/?12495475










-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Parker Schwartz [ So, 30 Juli 2006 12:07 ] [ ID #1410206 ]
Linux » gmane.linux.admin » trouble with CRON

Vorheriges Thema: Odd ghostscript problem (ps to PDF conversion)
Nächstes Thema: rpm dependency failure - libstdc++