codeObserver
codeObserver

Reputation: 6647

.bashrc not sourced from script when run as a cron job

I have a bash script that is invoked from a cron job which has the following lines:

source ~/.bashrc
jruby run.rb 

.bashrc adds jruby to the path.

I am able to invoke the script directly on a terminal but the cron fails with "jruby not found"

Any pointers ?

Upvotes: 1

Views: 1612

Answers (1)

user647772
user647772

Reputation:

Your must set your PATH in the script so that jruby is included in it.

Upvotes: 2

Related Questions