Jump to content

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?

Link to comment
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?

Link to comment
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
Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
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...