Do /etc/cron.d/* not load environment variables, while /etc/cron.d/ does't?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
From https://www.linuxquestions.org/questions/linux-newbie-8/etc-crontab-vs-etc-cron-d-vs-var-spool-cron-crontabs-853881/, I was wondering what the sentences highlighted by me mean, and why? Thanks.
scripts that are in /etc/cron.d/ don't load environment variables.
I'm assuming you added your command as root in the /etc/crontab file. If that's the fact then executing the crontab line will load the user's environment variables which don't get loaded when you put the script in /etc/cron.d.
cron
add a comment |Â
up vote
0
down vote
favorite
From https://www.linuxquestions.org/questions/linux-newbie-8/etc-crontab-vs-etc-cron-d-vs-var-spool-cron-crontabs-853881/, I was wondering what the sentences highlighted by me mean, and why? Thanks.
scripts that are in /etc/cron.d/ don't load environment variables.
I'm assuming you added your command as root in the /etc/crontab file. If that's the fact then executing the crontab line will load the user's environment variables which don't get loaded when you put the script in /etc/cron.d.
cron
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
From https://www.linuxquestions.org/questions/linux-newbie-8/etc-crontab-vs-etc-cron-d-vs-var-spool-cron-crontabs-853881/, I was wondering what the sentences highlighted by me mean, and why? Thanks.
scripts that are in /etc/cron.d/ don't load environment variables.
I'm assuming you added your command as root in the /etc/crontab file. If that's the fact then executing the crontab line will load the user's environment variables which don't get loaded when you put the script in /etc/cron.d.
cron
From https://www.linuxquestions.org/questions/linux-newbie-8/etc-crontab-vs-etc-cron-d-vs-var-spool-cron-crontabs-853881/, I was wondering what the sentences highlighted by me mean, and why? Thanks.
scripts that are in /etc/cron.d/ don't load environment variables.
I'm assuming you added your command as root in the /etc/crontab file. If that's the fact then executing the crontab line will load the user's environment variables which don't get loaded when you put the script in /etc/cron.d.
cron
cron
asked 9 mins ago
Tim
24.6k69239426
24.6k69239426
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f479522%2fdo-etc-cron-d-not-load-environment-variables-while-etc-cron-d-doest%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password