Jump to content
Sign in to follow this  
scottsgravy

Cron Command Help Please

Recommended Posts

I have a script I want to run: cron-lynx.sh

 

Its located here: /public_html/scripts/

 

Using the Standard Cron Manager in cpanel, what do I enter in "Command to run."

 

Thanks.

Share this post


Link to post
Share on other sites
You would enter: /home/yourcpanelname/public_html/scripts/name-of-script

 

Thanks. That path worked.

 

I'm getting an error:

 

/bin/sh: line 1: /home/controlpanelname/public_html/scripts/cron-lynx.sh: Permission denied

 

The script in cron-lynx.sh is:

#!/bin/sh

/usr/bin/lynx -source http://www.scottsgravy.com/cron.php > /dev/null 2>&1

Share this post


Link to post
Share on other sites

Scott, you may also want to run a simpler cron command, such as

>php -q /home/yourusername/public_html/cron.php

That way you don't need an extra shell script.

 

Moving for organization.

Share this post


Link to post
Share on other sites
Scott, you may also want to run a simpler cron command, such as

>php -q /home/yourusername/public_html/cron.php

That way you don't need an extra shell script.

 

Moving for organization.

 

Thanks, I tried that and got a bunch of errors. Maybe it doesn't work with Drupal?

 

The other way works though. Thanks everyone for your help. :P

Share this post


Link to post
Share on other sites

Well, I'm not sure how Drupal needs the script to be run but either way should work just fine. If you got errors when using the method I suggested, you probably got the same errors when using the shell script but those are redirected to /dev/null, so you won't see them.

 

Anyway, glad you got it working :thumbup:

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.

Sign in to follow this  

×
×
  • Create New...