vineld Posted March 3, 2010 Share Posted March 3, 2010 I am used to the control panels web hosting companies and therefore I rarely use crontab close to the source. Now I have no clue as to what I am doing wrong. In /home/DIR/ I have a file called crontab which contains the following: 5 * * * * /home/DIR/public_html/_cron/FILE > /dev/null .... 2 more .... 35 * * * * /home/DIR/public_html/ANOTHER_SITE_DOMAIN/_cron/MY_FILE > /dev/null Then, MY_FILE (no file extension) contains the following lines: #!/bin/bash cd /home/DIR/public_html/ANOTHER_SITE_DOMAIN/_cron/ /usr/local/bin/php /home/DIR/public_html/ANOTHER_SITE_DOMAIN/_cron/blabla.php I have no clue where things are going wrong... When I run the final line via SSH it works just fine. Quote Link to comment https://forums.phpfreaks.com/topic/194038-crontab-issues/ Share on other sites More sharing options...
vineld Posted March 3, 2010 Author Share Posted March 3, 2010 Oh, and when I run crontab -l it does list all of my cron jobs in the first file. Quote Link to comment https://forums.phpfreaks.com/topic/194038-crontab-issues/#findComment-1021048 Share on other sites More sharing options...
trq Posted March 3, 2010 Share Posted March 3, 2010 And what exactly is the problem? Quote Link to comment https://forums.phpfreaks.com/topic/194038-crontab-issues/#findComment-1021144 Share on other sites More sharing options...
vineld Posted March 4, 2010 Author Share Posted March 4, 2010 Good question, it seems to have something to do with /bin/bash. It is the correct path but it still complains (no such file or directory, bad interpreter). I have chosen the simple solution for now, just adding the cron job directly into crontab. That works but I still would like to know what causes the problems. Quote Link to comment https://forums.phpfreaks.com/topic/194038-crontab-issues/#findComment-1021289 Share on other sites More sharing options...
jskywalker Posted March 4, 2010 Share Posted March 4, 2010 for testing, remove the '>/dev/null' and add a line to your crontab file like this: MAILTO=youremailaddress@somewhere.com Output of your cron-job will be mailed to you, so you know what the problem is. If you still dont know after reading this output, than please post this output here, so readers here KNOW what the problem is, because you still have not mentioned here what your problem is....... Quote Link to comment https://forums.phpfreaks.com/topic/194038-crontab-issues/#findComment-1021304 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.