eZ Community » Forums » Install & configuration » OVH and cron jobs
expandshrink

OVH and cron jobs

OVH and cron jobs

Sunday 07 February 2010 9:10:01 pm - 8 replies

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

Tuesday 09 February 2010 9: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

Modified on Tuesday 09 February 2010 9:53:08 am by Robin Muilwijk

Tuesday 25 May 2010 10: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

Tuesday 25 May 2010 11: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/techn...x/features/cronjobs/running_cronjobs

Good luck,

Wednesday 26 May 2010 3:26:00 pm

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

Wednesday 26 May 2010 4:42:31 pm

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/extensi...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/techn..._functions/miscellaneous/cache_block

Thursday 27 May 2010 12:41:53 pm

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

Thursday 27 May 2010 12:43:55 pm

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

Thursday 10 June 2010 2:09:01 pm

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.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from