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

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

    Dear sir,

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

    thank you..

    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!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CRON job not updating album’ is closed to new replies.