Forums / Install & configuration / Around the CLI interface for running cronjobs

Around the CLI interface for running cronjobs

Author Message

Piotrek Karaś

Thursday 19 April 2007 1:14:23 pm

Hello,

The shared hosting solution I usually use lacks the CLI PHP interface. However, I found a way of running the cronjobs as regular PHP scripts with only minor kernel modification (discussed on this forum as well). The only problem I've got is... lack of interface, which means I cannot pass params to the runcronjobs script. However, the script looks like an abstract interface itself and I think it will be fairly easy to pass regular PHP variables to direct its work. Has anyone tried that? Any suggestions? Good/bad experiences?

Thanks,

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Björn Dieding@xrow.de

Thursday 19 April 2007 3:44:50 pm

Sorry for being rude.

You eZ partner i would recommend you step away from a non CLI PHP environment espacially if it is your common one. I guess you know the implications. Or force your host to use CLI PHP, because he is currently not doing his job right.

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Piotrek Karaś

Thursday 19 April 2007 10:16:43 pm

Björn,

Thank you for your reply. I don't attend this forum for nice atmosphere, even though it seems to be granted and I like being here. However, I come here to get and possibly share knowledge, so whenever I face a strong argument, I consider it and try to make use of it. Therefore I don't find your reply rude, I appreciate any relevant response :)

<i>You eZ partner i would recommend you step away from a non CLI PHP environment espacially if it is your common one. I guess you know the implications. Or force your host to use CLI PHP, because he is currently not doing his job right.</i>

At some level I agree with your thinking, as I usually oppose any unnecessary, non-best-practice core modifications, not only in eZ publish context. I'm working on moving to a more dedicated hosting solution, too. Unfortunately, some things cannot be done overnight, some things cannot be shaped the way we want, at least not at once. Meanwhile, I want to at least find and explore a bit all the possibilities.

I finally found the topic:
http://ez.no/community/forum/suggestions/workaround_for_installations_without_phpcli

You wrote there:
<i>...Ok, I have to say that may saying "some things simply do not work" it not correct in the sense.
The cli executes in a certain way and sets the enviroment just right. (cwdir, headers)
To simulate this you need to turn some switches for a non cli version. (like -C,-q and maybe others)
So in general </i><b>it is just easier to have the CLI</b><i> when working with comandline scripts, because you cannot forget to set some flags that may lead to unwanted errors.
I guess most users are not aware when to set which flag. They might start bug reporting and having issues that came up because they execute php a certain. With the cli you simply do not have this issue...</i>

My PHP experience tells me that it may be exactly the way you described it - it is easier (and correct) to have/use CLI. Still, it's only an interface which means it may be possible to modify/change/customize it. So far I don't see why I shouldn't proceed. It seems like several people have had it running all ok. Please correct me, if I'm wrong.

It seems that I will have to develop my own solution, I'll share it for discussion when it's ready (if it is :)

Greetings,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu