Jump to content

crontab issues


vineld

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/194038-crontab-issues/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/194038-crontab-issues/#findComment-1021289
Share on other sites

for testing, remove the '>/dev/null'

and add a line to your crontab file like this:

[email protected]

 

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.......

 

Link to comment
https://forums.phpfreaks.com/topic/194038-crontab-issues/#findComment-1021304
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.