Computing.Net > Forums > Solaris > Help! Let command not found in cron job

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Help! Let command not found in cron job

Reply to Message Icon

Name: John Toh
Date: December 19, 2001 at 08:19:59 Pacific
Comment:

Hi Everyone,

I had an urgent problem here...
Supposedly I create the following script:-

============================================
#!/usr/bin/ksh

let curday=`date +%d`
echo $curday

============================================

Running the above script at the unix prompt is alright but when i schedule it to run in cronjobs, there will always be an error message "let : not found"


I actually tried applying different paths on the above but still failed!

I am running Solaris 8 on this server.


Help appreciated!!!




Sponsored Link
Ads by Google

Response Number 1
Name: oliver
Date: December 19, 2001 at 12:29:20 Pacific
Reply:

what shell does the user who runs this cron job have? If it's root, then root has bourne shell where "let" is not recognised. Try running it as a regular user through cron


0

Response Number 2
Name: John Toh
Date: December 19, 2001 at 18:37:27 Pacific
Reply:

Help...

I tried with a regular user instead of root but still failed.... why is that it always prompt me for this problem "let: not found"????

Help deeply appreciated


0

Response Number 3
Name: Anthony Foot
Date: December 20, 2001 at 04:49:27 Pacific
Reply:

Hello,
It is down to the shell, it appears to not recognising you are trying to run it under the korn shell. The line #!/usr/bin/ksh is it the very first line of the program?
If not then it will not force your shell into korn shell (ksh). You must have no comments nor blank lines before it.

Thanks,

Anthony.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: Help! Let command not found in cron job

setenv: not found www.computing.net/answers/solaris/setenv-not-found/4046.html

Solaris 10.5 perl and cron job www.computing.net/answers/solaris/solaris-105-perl-and-cron-job/5065.html

cron job not working www.computing.net/answers/solaris/cron-job-not-working/4733.html