Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cron vs. command line

Status
Not open for further replies.

c2ssupport

Technical User
Mar 18, 2005
9
US
I have a major problem. I can execute a shell script fine
from the command line, but in cron, it starts and hangs
in the middle running some proprietary processes.
What is the difference between running from cron and command line?

please help...
mike d.
 
The [tt]crond[/tt] daemon is usually running in a Bourne shell and does not have your environment set. That means your cron job should specify the shell you want on the first line (something like)...
Code:
#!/bin/ksh
...and you need to make sure all environment variables you are expecting are defined in the shell script.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top