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
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
Share on other sites

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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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