Javier
2020-07-27 15:27:19 UTC
I make a cron directory /etc/cron.1min with scripts to be run every
minute.
I try to run it from /etc/cron.d
echo '*/1 * * * * root /usr/bin/run-parts /etc/cron.1min' \
$PATH variable and /usr/bin/run-parts needs a minimum
PATH=/sbin:/bin:/usr/sbin:/usr/bin to run.
But the PATH variable is set and things run when running from crontab.
echo '*/1 * * * * /usr/bin/run-parts /etc/cron.1min' \
Another question? how to get the output/stderr of scripts mailed to root?
All that is not clear from the crond(1) and crontab(1) manpages.
minute.
I try to run it from /etc/cron.d
echo '*/1 * * * * root /usr/bin/run-parts /etc/cron.1min' \
/etc/cron.d/cronjobs
But I get no success, I suspect because it is run with an empty$PATH variable and /usr/bin/run-parts needs a minimum
PATH=/sbin:/bin:/usr/sbin:/usr/bin to run.
But the PATH variable is set and things run when running from crontab.
echo '*/1 * * * * /usr/bin/run-parts /etc/cron.1min' \
/var/spool/cron/crontabs/root
Why is PATH set when running from crontab and not from /etc/cron.d?Another question? how to get the output/stderr of scripts mailed to root?
All that is not clear from the crond(1) and crontab(1) manpages.