Linux: cronjob

Linux: cronjob

When you setup a cronjob file (/etc/cron.d/filename) , the file should include the path below:
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin

this is because if you don’t set the path, some command might not run well such as: service ( because it can’t find service run file location)

Leave a Reply

Your email address will not be published. Required fields are marked *