Jump to content

Recommended Posts

Posted (edited)

Hi

 

I have searched the forums exstensively and tried all the alternatatives offered on cron tab and running a script ! I am trying to run a php file that does maintanence for my ad server ! I used to be in a shared enviroment and it worked fine ! I have since moved to a dedicated server to no joy !

 

Is there something i need to activate on the WHM panel to allow cron to run on the server or am i missing something ? The script is related to php adserver maintanence !

 

I have tried

 

GET http://www.XXXXXXX/file.php to no avail

 

Tried it with a path to the file

 

I am way confused !!!!

 

Any help appreciated !

Edited by stix
Posted

Thanks for the replies !

 

okay - i tried both ! Neither worked ?

 

I have checked the permission on the file - 755

 

I have doubled checked the file path

 

Any further suggestions ?

Posted
Welcome to the forums, stix!  :thumbup1:

 

How did you set up the time for the cron job to run?

 

 

 

Thanks David !

 

I set the time to run every minute mainly just to check i could get it working ! I was plannning to set it back to once an hour as pre the requirements of the software !

 

i tried in both both standard and advanced !

Posted

I use the following and it works.

 

>/usr/bin/php -q /home/cpanelname/public_html/path-to-php-file

 

Note that I added /usr/bin to the code, not that it should matter though. And replace cpanelname with your actual login name for cpanel.

 

Have you checked your error log file?

Posted (edited)
I use the following and it works.

 

>/usr/bin/php -q /home/cpanelname/public_html/path-to-php-file

 

Note that I added /usr/bin to the code, not that it should matter though.  And replace cpanelname with your actual login name for cpanel.

 

Have you checked your error log file?

 

:thumbup1: Still no joy .....

 

 

I looked in the error log file in the cpanel - and there is nothing related to the file i am trying to call

 

Dam !

 

As i mentioned earlier - when i was in the shared enviroment i had no problems calling it with an http://XXX.com/pathtofile.php

Edited by stix
Posted
I looked in the error log file in the cpanel - and there is nothing related to the file i am trying to call

I don't know that you'd see errors from your script in the error log. Usually, errors that occur in a cron job are e-mailed to you. You did enter an e-mail address in the "Please enter an email address where the cron output will be sent:" box on the Cron Jobs page in CPanel, right? :thumbup1: Have you checked your e-mail to see if you've received a ton of e-mails from cron by now?

 

As i mentioned earlier - when i was in the shared enviroment i had no problems calling it  with an http://XXX.com/pathtofile.php

You can't call a php script like that in a cron job, shared hosting or not. Are you sure the script is working on your new server (can you call it successfully in your browser)? What is the cron job command that you're currently trying to use?

Posted

Hi

 

 

I used both examples provided further up the thread - inserting the correct values !

 

I filled in the email - i am not recieving anything !

 

previously i used wget and i tried running to no joy !

 

I am trying to run the maintance script for phpadserver !

 

I keep running throu' the options, thanks for the replies !

 

Stu

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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