Statement returning error only launching the sh script via crontab


Login or Register to Reply

 
Thread Tools Search this Thread
# 8  
Old 2 Weeks Ago
sorry for the delay
tried this change:

Code:
35 10 * * * . $HOME/.bash_profile; /home/myscripts/myscript.sh

the same error

Smilie

Moderator's Comments:
Mod Comment edit by bakunin: Please use CODE-tags when posting code, file content or terminal output. Thank you.

Last edited by bakunin; 2 Weeks Ago at 02:32 AM..
# 9  
Old 2 Weeks Ago
Quote:
Originally Posted by mfran2002
Code:
35 10 * * * . $HOME/.bash_profile; /home/myscripts/myscript.sh

the same error
I told you to include the line
Code:
. $HOME/.bash_profile

into your script (myscript.sh) , not call it separately. This way two shells are called: first one shell which executes bash_profile, then this closes, then another shell which executes myscript.sh. The second one is of course not affected by any program that ran before.

And please, when you post code, data or terminal output, use CODE-tags as required by the forum rules.

I hope this helps.

bakunin
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Launching mplayer from within Links2 using a shell script ignatius Shell Programming and Scripting 16 11-09-2018 12:15 PM
Script gives error when scheduled in crontab scriptor UNIX for Beginners Questions & Answers 2 05-30-2017 03:01 AM
Not returning from a sub script? Charles Swart UNIX for Dummies Questions & Answers 1 01-23-2014 12:36 PM
[Solved] FOR loop / IF statement returning error jfxdavies Shell Programming and Scripting 5 09-02-2013 03:53 AM
[Solved] Crontab not launching script charli1 UNIX for Advanced & Expert Users 2 12-13-2012 09:15 AM
error in shell script while returning values-- urgent issue plz help. kasanur Shell Programming and Scripting 6 12-27-2011 05:14 AM
Script returning an error message on exiting bghosh Shell Programming and Scripting 2 11-15-2011 05:12 AM
shell script returning error code 2 from AIX to Mainframe Yogesh Aggarwal Shell Programming and Scripting 0 07-08-2011 06:53 AM
Error launching c++ executable JessicaAlfonsi AIX 2 03-14-2011 05:15 AM
Syntax error in script with if statement Straitsfan Shell Programming and Scripting 3 12-03-2010 10:39 PM
Launching a C program that needs input from a shell script momal Shell Programming and Scripting 4 11-06-2009 10:48 PM
Getting error when running script through crontab nypreH UNIX for Dummies Questions & Answers 4 10-28-2009 09:01 AM
launching script via REXEC JohnMurdoch UNIX for Dummies Questions & Answers 3 08-20-2008 05:42 AM
Usermod returning syntax error syndex Shell Programming and Scripting 6 07-02-2007 12:38 PM
returning to the parent shell after invoking a script within a script gurukottur Shell Programming and Scripting 5 09-26-2006 07:05 AM