Forums

Fotobook
CRON job not updating album (4 posts)

  1. seomartin
    Member
    Posted 1 year ago #

    The cron job (command was verified by hosting company) is not updating the photos on the album page. Please guide me.

  2. jackrugile
    Member
    Posted 8 months ago #

    Hey, I know this is a late reply, but I was having the same problem and finally figured it out. Hopefully the solution is still relevant to you.

    At first I was having trouble with getting my CRON job to even run the correct file. Then I was having trouble with CRON job that had parameters in the URL.

    So for starters, I know CRON job commands can vary from host to host. For Hostgator though, I use the following command:
    php -q /home/USERNAME/public_html/wp-content/plugins/fotobook/cron.php >/dev/null 2>&1

    Instead of using the parameters that are given in the URL on the plugin game, I just hard code those values into the cron.php script.

    This:

    if(isset($_GET['update']) && isset($_GET['secret']) && $_GET['secret'] == get_option('fb_secret')) {
    	echo 'Updating Fotobook (be patient)...';
    	ob_flush(); flush();
    	$facebook = new FacebookAPI;
    	if($facebook->link_active())
    		$facebook->update_albums();
    	echo 'Done';
    } else {
    	echo 'Invalid URL';
    }

    Becomes this:

    $secret = 'YOUR_SECRET_NUMBER_HERE';
    if($secret == get_option('fb_secret')) {
    	echo 'Updating Fotobook (be patient)...';
    	ob_flush(); flush();
    	$facebook = new FacebookAPI;
    	if($facebook->link_active())
    		$facebook->update_albums();
    	echo 'Done';
    } else {
    	echo 'Invalid URL';
    }

    Let me know if you have any questions or if that doesn't work.

  3. bizfarlis
    Member
    Posted 7 months ago #

    Dear sir,

    actually i try your code, but its not function for me. please help me.

    thank you..

  4. BaliRakhra
    Member
    Posted 6 months ago #

    Thanks SOOO MUCH, Jack! Finally my Fotobook automatically updates my WP albums!

    There are so many posts on the net for this topic and I've tried them all. None worked for me but this.

    Anybody else finding it hard to find the right answer on the net for this problem. Trust me. Try this one!

    Best of luck!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags