Jump to content
laburke

New To Cron Jobs - How To Fix This Error?

Recommended Posts

I have membership software (aMember Pro) installed on one of my sites, and I need to set up a cron job to process credit cards. This is what aMember Pro says to use for the command when setting up a cron job.

 

/usr/bin/lynx -source http://yoursite.com/amember/cron.php

 

and if that doesn't work, to try these:

 

/usr/bin/curl -s http://yoursite.com/amember/cron.php

/usr/bin/wget -o/dev/null -O- http://yoursite.com/amember/cron.php

/usr/local/bin/lynx -source http://yoursite.com/amember/cron.php

/usr/local/bin/curl -s http://yoursite.com/amember/cron.php

/usr/local/bin/wget -o/dev/null -O- http://yoursite.com/amember/cron.php

 

However, here on the TCH forums, I find this is what should be used:

/usr/bin/php -q /home/userid/public_html/path-to-file-to-run

 

Well, I've tried them all, and nothing works. With some, I get this error:

/bin/sh: /usr/bin/lynx: Permission denied

 

and with some I get this:

/bin/sh: home/userid/public_html/amember/cron.php: No such file or directory

 

I've double-checked that cron.php is definitely in /amember/.

 

I don't know what I'm doing - can someone help, please?

Share this post


Link to post
Share on other sites

You cannot run lynx, wget or curl from cron for they have been disabled on the servers.

 

You will have to find another way to run those jobs.

 

You can try:

 

>/usr/bin/php -q /home/userid/public_html/amember/cron.php

Share this post


Link to post
Share on other sites
You cannot run lynx, wget or curl from cron for they have been disabled on the servers.

 

You will have to find another way to run those jobs.

 

You can try:

 

>/usr/bin/php -q /home/userid/public_html/amember/cron.php

Hi Bruce, thanks for replying. Yes, that is one of the ones I tried, and that's when I get this error:

/bin/sh: home/userid/public_html/amember/cron.php: No such file or directory

 

Do you know what else it could be?

Share this post


Link to post
Share on other sites
You are using your cpanel username where it says userid, correct?

Yes - Oh, how I wish it were that simple! :) Thanks!

Share this post


Link to post
Share on other sites

If the file is in the amember folder and the amember folder is in public_html then the cron should work. It is difficult for folks here to help determine what could be happening without the domain.

Share this post


Link to post
Share on other sites
Does that mean you have it working?

Oops, no, sorry, I guess my comment was a little confusing :)

If the file is in the amember folder and the amember folder is in public_html then the cron should work. It is difficult for folks here to help determine what could be happening without the domain.

I'm sorry, I always forget to include the domain when I ask questions. It's Ontonagon Herald but you would need more info than that to be able to tell, wouldn't you? I admit to being a little confused. Okay, a lot. Anyway, let me know if I should open a ticket, or if I should just buzz off :)

Edited by laburke

Share this post


Link to post
Share on other sites
/bin/sh: home/userid/public_html/amember/cron.php: No such file or directory

 

This error generally indicates that it cannot locate the file "cron.php" in the path specified. So without knowing your userid (and I don't recommend posting it here in the forums). Open a ticket and the techs can take a look.

Share this post


Link to post
Share on other sites
/bin/sh: home/userid/public_html/amember/cron.php: No such file or directory

 

You are missing the leading "/". It should be "/usr/bin/php -q /home/userid/public_html/amember/cron.php", but I think the first one got left out.

Share this post


Link to post
Share on other sites

I just installed Drupal on mythusmage.com in the root directory, Drupal needs a cron-job for certain functions. The command would be...

 

The (partial) file path is, /public_html/cron.php in case you're wondering.

Share this post


Link to post
Share on other sites

Oops, I just realized when I got e-mail notification of a reply on this topic that I had never thanked everyone for their help with my issue. As far as I know, it's been working fine, so thanks! :thumbup1: Sorry about the delay.

Share this post


Link to post
Share on other sites
It should be

/usr/bin/php -q /home/cpanelusername/public_html/cron.php

 

Ah, clarity arises in this one's mind. :thumbup1:

 

Much thanks. I'll pass word on to the Drupal forums.

Share this post


Link to post
Share on other sites

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