Auto-delete mechanism

Author Message

Nebojsa Eric

Friday 19 May 2006 1:48:40 am

Does anyone have a clue how to make some sort of a mechanism that will trigger every day to delete postings of the specified section of the site older then a current day? Tnx.

Kristof Coomans

Friday 19 May 2006 4:09:59 am

Hi Eric

You can write a cronjob script to do this. I think there are no contributions yet with the same purpose.

There is however a cronjob script included with eZ publish (cronjobs/unpublish.php) to remove content objects based on the specified time in an attribute with identifier unpublish_date. You can configure it with the UnpublishSettings group in content.ini. It can serve as an example for your own cronjob script.

This forum topic will give you some additional information:
http://ez.no/community/forum/general/display_article_only_for_a_limited_period_of_time/

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

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 19 2025 04:23:38
Script start
Timing: Jan 19 2025 04:23:38
Module start 'layout'
Timing: Jan 19 2025 04:23:38
Module start 'content'
Timing: Jan 19 2025 04:23:39
Module end 'content'
Timing: Jan 19 2025 04:23:39
Script end

Main resources:

Total runtime0.8859 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 589.0469152.6094
Module start 'layout' 0.00460.0023 741.656339.4141
Module start 'content' 0.00690.8775 781.0703528.3594
Module end 'content' 0.88440.0014 1,309.42978.1875
Script end 0.8858  1,317.6172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.3370160.0002
Check MTime0.00120.1331160.0001
Mysql Total
Database connection0.00070.081810.0007
Mysqli_queries0.843695.2252540.0156
Looping result0.00040.0485520.0000
Template Total0.855996.620.4280
Template load0.00210.236620.0010
Template processing0.853896.383220.4269
Template load and register function0.00010.011910.0001
states
state_id_array0.00090.107110.0009
state_identifier_array0.00060.068320.0003
Override
Cache load0.00170.1956120.0001
Sytem overhead
Fetch class attribute can translate value0.00060.069220.0003
Fetch class attribute name0.00110.121440.0003
XML
Image XML parsing0.00090.102820.0005
class_abstraction
Instantiating content class attribute0.00000.000740.0000
General
dbfile0.00200.2278220.0001
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs