Register now or log in to join your professional community.
when running command in crontab scheduled job it cannot see the path /usr/local/bin how can I add this path to the environment variable PATH in to be seen by crontab?
I don't want to set it as all time scheduled job to set PATH I want to set it in place/file where crontab call this variable.
I see that I can add this variable to my script also I can set the full path of the command which run.
as /usr/local/bin/sshpass.
I want to know which file I have to modify for crontab to read the new modified PATH env variable?
We can use multiple options for env path into cronjob
Second, run source /etc/profile from cronjob files always
#crontab -e
* * * * * PATH=$PATH:/usr/local/bin /path/to/your/cronjob