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

eZ debug

Timing: Jan 18 2025 22:38:03
Script start
Timing: Jan 18 2025 22:38:03
Module start 'content'
Timing: Jan 18 2025 22:38:03
Module end 'content'
Timing: Jan 18 2025 22:38:03
Script end

Main resources:

Total runtime0.2847 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 587.9609180.8047
Module start 'content' 0.00680.0055 768.765697.9766
Module end 'content' 0.01230.2723 866.7422526.2500
Script end 0.2846  1,392.9922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00381.3250200.0002
Check MTime0.00150.5143200.0001
Mysql Total
Database connection0.00100.336510.0010
Mysqli_queries0.235782.79641410.0017
Looping result0.00160.54701390.0000
Template Total0.271895.510.2718
Template load0.00090.317510.0009
Template processing0.270995.167010.2709
Override
Cache load0.00060.216810.0006
Sytem overhead
Fetch class attribute can translate value0.00100.366010.0010
XML
Image XML parsing0.00020.069910.0002
General
dbfile0.00270.9487200.0001
String conversion0.00000.002530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs