Hi everyone,

I just stumbled upon the cron.php file in the bin folder of newer oxid 
versions. As far as I can tell, this script creates an instance of 
oxmaintenance and calls its execute() method. As oxNew() is used to create the 
instance, one could easily create a module that inherits oxmaintenance and adds 
extra functionality to the execute() method. This would be useful, if one needs 
additional processing to be done periodically, (e.g. once a day/hour, etc.).

However, what if you want to have some task being executed once a day and 
another one once a week. Would you just make a copy of the cron.php file, name 
it differently (e.g. cron.daily.php) and change its content so that it doesn't 
instanciate oxmaintenance, but some other class (probably inside a module)?

Another thing that comes to my mind is shell integration. The script itself 
seems to fire up the minimum oxid framework required to call oxNew() or to use 
model (core) classes to talk to the database. So maybe I could use this as a 
base for writing command line scripts that allow me to do some on demand 
maintenance over ssh or so. Maybe some of the required features are there 
already (e.g. command line parameter parsing, help output, etc.)?

Any more information on this would be much appreciated, thank you!

Best regards
Dipl.-Ing. (FH) Michael Zender
Development eCommerce
Technical Project Lead
MOS-TANGRAM AG
Wohlerstrasse 2
CH-5623 Boswil
Phone: +41 (0)56 677 82 20
Fax: +41 (0)56 677 82 99
E-Mail: [email protected]<mailto:[email protected]>
Internet: http://www.mos-tangram.com<http://www.mos-tangarm.com/>

_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

Reply via email to