Adding cvsimport extension into cronjobs tasks

Author Message

David Zaoui

Tuesday 10 July 2007 7:09:02 am

Hi,

I've just installed a csv import extension which works quite well, through an interface or the following command line:

./extension/csv/import.php [pattern] [filename].

Now i want to add import.php as a cronjob task.

i added the following lines to cronjob.ini :

[CronjobSettings]
ExtensionDirectories[]=csv

[CronjobPart-importagences]
Scripts[]=import.php

Obviously it doesn't work, as i don't know how to precise the two arguments ( [pattern] and [filename]) to the cronjob.

i thought changing the import.php file to put directly into it the value of the arguments but i hope there is a better way to proceed...Have you got any idea ?

Lukasz Piech

Tuesday 10 July 2007 7:22:03 am

I have a little dirty workaround for that. But it is the most simple one.

Instead of making eZ do that, let Linux do that !

write it directly into a crontab

i.e.

35 6 * * * cd /path to ez && /path to php/php extension/csv/import.php [pattern] [filename].

Lukasz

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 03:32:40
Script start
Timing: Jan 31 2025 03:32:40
Module start 'layout'
Timing: Jan 31 2025 03:32:41
Module start 'content'
Timing: Jan 31 2025 03:32:41
Module end 'content'
Timing: Jan 31 2025 03:32:41
Script end

Main resources:

Total runtime0.0257 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.2656151.2266
Module start 'layout' 0.00500.0047 739.4922220.7188
Module start 'content' 0.00970.0145 960.2109997.8516
Module end 'content' 0.02420.0014 1,958.062529.9922
Script end 0.0256  1,988.0547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002610.2013140.0002
Check MTime0.00114.2303140.0001
Mysql Total
Database connection0.00072.553810.0007
Mysqli_queries0.003112.158530.0010
Looping result0.00000.042710.0000
Template Total0.00104.010.0010
Template load0.00083.137410.0008
Template processing0.00020.822510.0002
Override
Cache load0.00052.113310.0005
General
dbfile0.00124.533380.0001
String conversion0.00000.030740.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