Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Cron jobs do not import all environment variables. Luckily they do provide a way to provide variables to Cron.
- Using crontab -e you can set variables just as you would in /etc/environment
- Add your variables to the top of the file.
- var1=/home/user/scripts
- var2=https://webhook.url
- Save the changes.
- Now when you run a cron job it will have access to those variables that you set.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement