![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| not getting the output properly | pmrajesh21 | SUN Solaris | 0 | 04-16-2008 07:43 AM |
| Cron - Not working properly | risshanth | HP-UX | 23 | 10-31-2007 03:34 AM |
| New hdd not being recognised properly by OS | wiggiesworld | UNIX for Dummies Questions & Answers | 1 | 06-03-2006 06:59 AM |
| y is this not working properly? | C|[anti-trust] | High Level Programming | 3 | 05-18-2005 09:55 AM |
| Not properly shutdown | DISTURBED | Filesystems, Disks and Memory | 5 | 05-06-2005 06:39 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Cron won't run properly
I am new to unix, and this is my 1st post on this board. Looking for some advice about a cron job in my server.
I am running a cron task that references a script which runs several other scripts and compiles them into a report and emails it to me. If I run the script manually, I will receive the whole report, but when it runs through cron, it will run successfully, but the report is incomplete. I keep thinking that there is a permission issue somewhere, but I am unsure. Any suggestions? |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
This is a very common issue. A script run in cron does not take the user environment into consideration, i.e., paths, shell, etc. You need to go back to your main script and all the others referenced in the main script and make sure that shells and paths to commands are declared.
BTW, you can do a search in this forums. You will be able to find more details on this, and a lot of other common questions. |
|
#3
|
|||
|
|||
|
The directory information seems fine, because like I said when I run it manually the whole report is completing. But the shell may be a problem.
In the crontab, the task designates "csh -c" but then in the beginning of the other scripts, it does not designate which shell is being used. How would I do that in the script? should I add a line "!/bin/csh" ? |
|||
| Google The UNIX and Linux Forums |