linux - Proper way to run a script using cron? -


When running the script with the cron, any execution must be called in. The full path must be in. I came to know that it was trying to walk, when many errors were shown when he tried to call TC. So my question is, what is the right way to overcome this problem?

Possible Solution:

  • Create a symbolic link for the CD and any other executable in the executable folder (
  • Use (it works - low portability across different distributors)
  • Export path variables with the required path inside the script (Not sure that it works)

OK, thanks in advance for helping anyone

Announcing the variable inside your cron job is more clear and easy to maintain: Anything in the job will need to be modified, and you do not have to transfer many files, it should be taken to any other system.

  PATH = / usr / bin: / your / fancy / Dir MYAPPROOT = / var / lib / myapp * / 2 * * * * myappinpath * / 3 * * * * $ MYAPPROOT / mylocalapp  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -