I have seen these questions, but they have not solved my problem:
Question about cronjobs/bash scripts which are not executed
Cronjob script not being executed
This is my /Temp/RunJob script:
echo $"Bringing all sites up... $(date)" >> /Temp/UpAll
/Base/Commands/Job
echo $"Done $(date)" >> /Temp/UpAll
Please note that it has an empty line at the end of the file as per Linux's standards.
And this is my /Base/Commands/Job script:
echo 'Main job' >> /Temp/JobLog
And this is the output of my crontab -l:
*/5 * * * * /Temp/RunJob 2>/dev/null
Please note that I have an empty line at the end of my crontab file.
And this is the output of grep CRON /var/log/syslog:
Nov 11 06:30:01 server7-paydardata-com CRON[48493]: (root) CMD (/Temp/RunJob 2>/dev/null)
Nov 11 06:35:01 server7-paydardata-com CRON[48619]: (root) CMD (/Temp/RunJob 2>/dev/null)
Nov 11 06:40:01 server7-paydardata-com CRON[48771]: (root) CMD (/Temp/RunJob 2>/dev/null)
Nov 11 06:45:01 server7-paydardata-com CRON[49397]: (root) CMD (/Temp/RunJob 2>/dev/null)
Nov 11 06:50:01 server7-paydardata-com CRON[49564]: (root) CMD (/Temp/RunJob 2>/dev/null)
Nov 11 06:55:01 server7-paydardata-com CRON[49685]: (root) CMD (/Temp/RunJob 2>/dev/null)
Nov 11 07:00:01 server7-paydardata-com CRON[49804]: (root) CMD (/Temp/RunJob 2>/dev/null)
Nov 11 07:05:01 server7-paydardata-com CRON[49924]: (root) CMD (/Temp/RunJob 2>/dev/null)
Nov 11 07:10:01 server7-paydardata-com CRON[50045]: (root) CMD (/Temp/RunJob 2>/dev/null)
And I am the root user. (whoami => root)
And I see that my /Temp/RunJob is actually executed by cron, but I can't see anything related to the /Base/Commands/Job in the logs.
In other words, cron seems to not execute the internal commands of my job.
How can I debug this?