Passing custom CLI params for custom cronjobs

Author Message

Piotrek Karaƛ

Tuesday 16 September 2008 4:31:23 am

Any non-hacking method of passing user params to custom cronjobs thought CLI? Any existing hacks?

Thanks,
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

Maxime Thomas

Monday 23 August 2010 4:48:20 am

Yes, it's a bit late I guess but in your cornjob, you can do like this :

 $options = $script->getOptions("","",array());

And in it you have an array with all your arguments.

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

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

eZ debug

Timing: Jan 31 2025 00:31:02
Script start
Timing: Jan 31 2025 00:31:02
Module start 'layout'
Timing: Jan 31 2025 00:31:02
Module start 'content'
Timing: Jan 31 2025 00:31:02
Module end 'content'
Timing: Jan 31 2025 00:31:02
Script end

Main resources:

Total runtime0.0208 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 588.2656151.2266
Module start 'layout' 0.00460.0036 739.4922220.7188
Module start 'content' 0.00820.0112 960.2109997.9609
Module end 'content' 0.01940.0013 1,958.171929.9922
Script end 0.0207  1,988.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002512.2799140.0002
Check MTime0.00104.7599140.0001
Mysql Total
Database connection0.00083.671010.0008
Mysqli_queries0.00188.839830.0006
Looping result0.00000.052810.0000
Template Total0.00104.610.0010
Template load0.00073.391910.0007
Template processing0.00031.223310.0003
Override
Cache load0.00052.404110.0005
General
dbfile0.00031.447380.0000
String conversion0.00000.035640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

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

Time used to render debug report: 0.0001 secs