forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: wbeddoe on January 22, 2014, 04:30:21 pm

Title: UTIL.PHP in crontab
Post by: wbeddoe on January 22, 2014, 04:30:21 pm
Is there a way to schedule the updating of thumbs and images via cron job instead of via admin interface? If so, what would the command line look like to hit all galleries/images?

Oftentimes users will see no image on the detail page but when they click on the default database tin can image, they will get the full-size image.

Coppermine 1.5.22

Thank you.
Title: Re: UTIL.PHP in crontab
Post by: Αndré on January 23, 2014, 09:25:49 am
Usually there's no need to run the admin tools periodically. If your files disappear for some reason, you should find the reason and it's probably not Coppermine. Previously you should upgrade to the latest stable release, currently cpg1.5.26.

To answer your question: it should be possible to run util.php via a cron job, but you'd need to create a custom script which authenticates itself as admin user and submit the correct form values. Depending on the size of your gallery and your PHP settings you probably will run into maximum execution time issues, so I assume it would be easier to create a custom shell script that updates your images via ImageMagick (of course you need to hard-code your current Coppermine picture settings and imitate its behavior to get correct results).
Title: Re: UTIL.PHP in crontab
Post by: wbeddoe on January 23, 2014, 02:39:45 pm
Got it; thanks for the response Αndré