OVH and cron jobs

Author Message

Robin Muilwijk

Sunday 07 February 2010 12:10:01 pm

Hi,

Does anyone have experience with hosting on OVH and specifically with setting up the eZ cronjobs?

I have a shared hosting account with OVH, and can get the normal /runcronjobs.php running. But... when it comes to adding the " infrequent" and " frequent" part I run into trouble. I need to set this up on a task scheduler which is basically a short webform with some options. The task to run is a field which does not allowe for spaces, so... how to add that infrequent/freqent part?

Hoping someone else might have encountered this problem.

Thanks, Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Robin Muilwijk

Tuesday 09 February 2010 12:25:44 am

Some feedback while I am still waiting for the customer support from OVH to reply. To get my crons working I had to use 2 workarounds.

#1; since the hosting account runs on CGI I had to edit the script /kernel/classes/ezscript.php. At line 179 I commented out:

exit( 1 );

#2; the form to set the script in the task scheduler does not allow for spaces so using "/runcronjobs.php frequent" did not work. Same for infrequent.

What I did here was copy runcronjobs.php twice and rename to runcronjobsfrequent.php and runcronjobsinfreqent.php and calling those scripts from the task scheduler.

In both files I added the following above line 305:

/* set cron part*/
$cronPart = 'frequent';

for the frequent crons and

/* set cron part*/
$cronPart = 'infrequent';

for the infrequent crons.

Hope to hear more from OVH soon so I can skip the workarounds but wanted to share them anyway in case someone else with hosting at OVH runs into the same problems.

Regards Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Romeo Antony

Tuesday 25 May 2010 1:13:50 am

Robin, can you help you regarding the crone job.I am a new person to ezflow.I do not know which crone job to run for rotating items in the blocks.How do I run it.Any idea will be helpfull. Thanks in advance

Paul Leclercq

Tuesday 25 May 2010 2:31:25 am

Hello Robin and Romeo,

If you wish to execute crons with ovh, then you can set them up in your manager:
http://help.ovh.co.uk/HostingCron

Although, you will have more information on the french version, which you can then translate with google translate:
http://guides.ovh.com/MutualiseCron

As for ezflow, the cronpart, you need to execute to update the data of dynamic blocks is this called "ezflow" and is defined in the file /extension/settings/cronjobs.ini.append.php:

You can run it at the root of your folder in the following way:

>>> php runcronjobs.php ezflow

I set it up my crontab in the following way:

------------------------
# This must be set to the directory where eZ Publish is installed.
EZPUBLISHROOT=/var/www/bayard/www
# Location of the PHP Command Line Interface binary.
PHP=/usr/bin/php

# Every five minutes
*/5 * * * * su - www-data -c "cd $EZPUBLISHROOT && $PHP runcronjobs.php ezflow" > /tmp/ezflow.cron.log 2>&1
-------------------------

You also have nice information on setting up the crontabs on this page:
http://ez.no/doc/ez_publish/technical_manual/4_x/features/cronjobs/running_cronjobs

Good luck,

Romeo Antony

Wednesday 26 May 2010 6:26:00 am

Thank for your instructions Paul.I configured manual blocks in ezflow front page and need to rotate the overflow items .So the do i can set overflow only for dynamic blocks.I am sorry i do not deeply in touch in this crone job thing. Also Paul I have run the runcronjobs.php file in the ezpublish folder.And created a batch file and put it in sheduled task.But overflow is activated .But only overflow is seen when I send any itme to publish.Overflow doesn't come by itself.

Thanks in advance ROmeo

Paul Leclercq

Wednesday 26 May 2010 7:42:31 am

Hello Romeo,

>> I configured manual blocks in ezflow front page and need to rotate the overflow items.
>> But overflow is activated .But only overflow is seen when I send any itme to publish.Overflow doesn't come by itself.

Unfortunatly only dynamic blocks will be updated automaticaly with the cronjob.

Here is an exemple on how to create a dynamic block:
http://share.ez.no/forums/extensions/ez-flow/example-how-to-do-a-dynamic-block.useful-for-you

Static and manual blocks will normaly only be updated when the page is edited.
Unless, you deactivate the cache on this block.

I tend to modify the pagelayout of the site, so that the columns of the site are not included in the full_view of the item, since this means that you need to empty the content cache of too many items. I prefer to fetch the content of the column and use a cache-block to control the rythme at which you empty this cache.

If you will need more indepth understanding of the cache-blocks I recommend you read this information:
http://ez.no/doc/ez_publish/technical_manual/4_x/reference/template_functions/miscellaneous/cache_block

Romeo Antony

Thursday 27 May 2010 3:41:53 am

Paul , I am so thankfull for your reply.

what I understand is only dynamic blocks will be updated automaticaly with the cronjob.(means manual blocks can't automatically update and show overflow with crone job)

static and manual blocks only updated when page edited .

i have got till this point.

Issue comes here

1. [ "you deactivate the cache on this block" ], where do I find the cashe on this manual block where I apply cronejob.that means I just only need to clear the cashe from admin interface?

2. So i can't see the rotation in manual blocks by apply crone job.

So I need to chnage all the synamic block ? Is that what u r teeling Pual

Any way I will go through this http://ez.no/doc/ez_publish/techn..._functions/miscellaneous/cache_block

http://share.ez.no/forums/extensi...to-do-a-dynamic-block.useful-for-you

regards Romeo

Romeo Antony

Thursday 27 May 2010 3:43:55 am

Sorry for my spelling . so I need to change all manual blocks to dynamic blocks?

Sebastiaan van der Vliet

Thursday 10 June 2010 5:09:01 am

Hey Mario,

We are getting mail from you(?) regarding the cronjob:

"I have set a cronejob for dynamic block in ezflow.Cronejob is working, but when run cronejob I need to refresh webpage to see the overflow of blccks(to see the dynamic block content changes).I have set {set-block scope=root variable=cache_ttl}2{/set-block} in top ofarticle.tpl.frontpage.tpl.image.tpl templates.What I am missing.Please help.How do see the overflow without refresh the page"

If you have any questions, please post them on the forum, and don't send these directly.

Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.