Forums / Developer / Cronjob script : retrieve the date of the last execution ?

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Cronjob script : retrieve the date of the last execution ?

Author Message

Damien Pobel

Wednesday 07 January 2009 5:14:19 am

hi,

I'm writing a cronjob script for the extension eZAWStats [1] to correct files generated by AWStats. To avoid to process all files at every execution, I need a way to remember the date of the last execution.

I see many ways of doing that :
1. add the timestamp in expiry.php using the eZExpiryHandler class
2. use my own file to store the last execution time using the eZPHPCreator class
3. store the timestamp in my own SQL table
4. store the timestamp in an existing table like ezsite_data or in ezoperation_memento using eZMementoOperation persistent object

What is the best practice in such case ?

[1] http://projects.ez.no/ezawstats

cheers

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

André R.

Wednesday 07 January 2009 5:50:37 am

Alternative 5: Re-use code form updateviewcount.php (writing last log line to log file).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom