Smart questions
Smart answers
Smart people
Join Tek-Tips Forums

Member Login

Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

m2001331 (TechnicalUser) (OP)
2 Jul 04 20:18
dear all,

i have set a cronjob line below in crontab under one of the admin users - who also owns the file,I expect it to run every hour,however the cron is not running.
I can execute manually and it runs well.
please advice.i don't know where i went wrong.
please help.

# cron to clear
0 * * * * /klush/

KenCunningham (TechnicalUser)
3 Jul 04 3:51
Make sure the appropriate PATH variable is set in the script, you can check this if you type echo $PATH in the environment you run the job interactively, and then use the same in your script, as one (if not the) first commands.
m2001331 (TechnicalUser) (OP)
3 Jul 04 8:04
I have no problem running the script manually - i just cannot get the cron to run.
so i figure that the script contains the correct path -
i have set the cron to run hourly .
m2001331 (TechnicalUser) (OP)
3 Jul 04 9:41
Hi below is the error message i received in mail for user oadm. i don't understand why it says[9] when the crontab entry is like:-
0 * * * * /klush/

and the sh file is located in folder klush - when i pwd the return is /klush/

Mail message.
Message  1:
From daemon Sat Jul  3 09:30:00 2004
Date: Sat, 3 Jul 2004 09:30:00 -0400
From: daemon
To: oadm

/klush/[9]: java:  not found.

        cron: The previous message is the standard output
        and standard error of one of the cron commands.

please advise.
cron newbie.
unixfreak (ISP)
3 Jul 04 10:22

As KenCunningham says you need to set the environment variables in the script.

m2001331 (TechnicalUser) (OP)
3 Jul 04 11:10 works after setting the PATH.
RodKnowlton (MIS)
6 Jul 04 9:24
For future reference, the [9] meant that the error occurred on the ninth line of the script.

Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close