Welcome to Geeklog Friday, May 07 2021 @ 03:11 am EDT

Geeklog Forums

Info on Cron for Geeklog within a Cpanel interface.


Status: offline

ScurvyDawg

Forum User
Full Member
Registered: 06/11/02
Posts: 523
excited
I went to the FAQ and found some great info on setting up the daily digest. I did however have some issues using the info I was provided here You see after working with another fellow it was finally figured out by him not I that this is the string that needs to be entered 30 2 * * * php -q -f /home/pathto/emailgeeklogstories Not 30 2 * * * /path/to/geeklog/emailgeeklogstories as given in the example. I am not sure if this is specific to a Cpanel interface or not but the Daily Digest is working now and it ROCKS, thank you.
 Quote

Status: offline

matthewcox

Forum User
Junior
Registered: 11/12/03
Posts: 31
Location:Asheville, North Carolina
Most Cpanel installations put php in /usr/bin/php. If you look in the emailgeeklogstories script, you'll notice that the shabang line(line1) tells the system to use /usr/local/bin/php which doesn't exist. To be sure you have the right /path/to/php (or path to php) you can try one these methods (unix only sorry).

  • login via ssh and type "which php" to get the path.
    PHP Formatted Code
    jailshell-2.05a$ which php
    /usr/bin/php
    jailshell-2.05a$
     

  • since some systems don't have the which command, you could try
    PHP Formatted Code
    find / -name php -printf '%AY%Ad%AH%AMt%pt%Acn' 2>/dev/null|sort
     
    Most likely, you will only see 2 entries(one bin and one lib).
    PHP Formatted Code
    jailshell-2.05a$ find / -name php -printf '%AY%Ad%AH%AMt%pt%Acn' 2>/dev/null|sort
    2003160150      /usr/bin/php    Tue Dec 16 01:50:54 2003
    2003160249      /usr/lib/php    Tue Dec 16 02:49:58 2003
    jailshell-2.05a$
     

    Choose the 'bin' entry for your path. If you have more than 2, the find statement above lists the php files in the order that they were last accessed. Most likely the most recently accessed bin/php is the one you're after.

  • If all else fails, email your sysadmin for the /path/to/php


Once you get the correct path, change the shabang line to
PHP Formatted Code
#!/correct/path/to/php -q
 

Of course, my advice to you ScurvyDawg, is to leave yours alone if it works, but hopefully this will help someone else. Smile

Also, if anyone knows any better ways to find the path to php, I'd love to hear.
 Quote

Status: offline

ScurvyDawg

Forum User
Full Member
Registered: 06/11/02
Posts: 523
cool, I did not know that was why the basic documentation did not work for me.

Thanks
 Quote

All times are EDT. The time is now 03:11 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content