|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
[Solved] Script runs in shell but not cron
We run some menu driven software that has the ability to batch menu paths and generate reports quickly. Normally you run a batch like: Code:
$ BATCH BATCHNAME The batch program then prompts you for the date you want the report run for. I got some help from some folks on IRC to do the following: Code:
BATCH BATCHNAME $(date +%y%d%m) This allowed me to run the batch using the current date without having to enter the date at the prompt (it auto-fills the prompt in effect). It runs fine from the $ (ksh) and it runs fine from a script (sh something). However, when I try to run it with cron it errors out with invalid date. I have tried calling the script from cron AND running the straight BATCH command from cron (both methods listed above). Why wont cron let me feed the above date variable to my batch program? |
| Sponsored Links | ||
|
|
#3
|
||||
|
||||
|
checking the users in smit, i am seeing that cron user has the same home directory and all the same settings as MY username. and no, i did not make it that way. SOLVED. that was the ticket bakunin. I had been messing around with env stuff in my script already with no luck. then i tried Code:
TERM=ansi and that got it. Thanks!
Last edited by bakunin; 01-02-2013 at 07:01 AM.. |
| Sponsored Links | ||
|
![]() |
| Tags |
| cron script doesn't shell run |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Only half my script runs | vsekvsek | UNIX for Dummies Questions & Answers | 3 | 11-30-2012 03:33 PM |
| [Solved] Shell not running through cron | Jcpratap | Shell Programming and Scripting | 6 | 11-27-2012 09:34 AM |
| Shell Script runs good manually but not through Cron tab | naren.chowdhary | Shell Programming and Scripting | 1 | 05-14-2012 01:02 PM |
| CRON shell script only runs correctly on command line | louieaw | Shell Programming and Scripting | 4 | 04-06-2011 04:21 AM |
| Script runs fine, but not in a cron | sammyk | Shell Programming and Scripting | 4 | 01-24-2010 10:35 AM |
|
|