I have a shell script which opens sqlplus and select some data from db containing chinese characters. When I execute it manually, the output contains those characters. When I do it via cron or jenkins job, it displays question marks instead of chinese characters. Any advice ?

  • The main point is to set up a cron or jenkins job to execute script periodicaly. – FunTomas Apr 25 '18 at 9:05
  • 1
    It could be an environmental variables issue. – Raman Sailopal Apr 25 '18 at 9:23
  • have you read man 5 crontab ? – Archemar Apr 25 '18 at 11:17
  • @RamanSailopal - Thanks it really was env variable issue, I just added $HOME/.bash_profile before main script in crontab and it works now. Thanks – FunTomas Apr 26 '18 at 10:54

It was enviroment variable issue. I just added . $HOME/.bash_profile beofre main script execution in crontab. 00 10 * * * . $HOME/.bash_profile; /home/scripts/script.sh

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.