Adding a new pseudocron task when installing a new module
Posted: Wed Mar 21, 2012 5:10 pm
Hi,
I am working on an extension module for Products which aims to do some administrative tasks such as enabling/disabling products based on some conditions or hold some sales statistics etc. To that end, i need to implement a pseudocron task that will run asynchronously and update various database fields of Products or other modules.
From what i've seen in other posts:
e.g.
http://forum.cmsmadesimple.org/viewtopi ... =4&t=49995
one has to implement the task functionality inside a class that should be put in /lib/tasks directory.
So, what is the best way of achieving this in a typical module installation/removal ? I mean, how can I install this task class file as a part of the installation procedure? Should I copy it explicitly to the root_path/lib/tasks directory or is there another way ?
By the way, i am using cmsms 1.10.3
I am working on an extension module for Products which aims to do some administrative tasks such as enabling/disabling products based on some conditions or hold some sales statistics etc. To that end, i need to implement a pseudocron task that will run asynchronously and update various database fields of Products or other modules.
From what i've seen in other posts:
e.g.
http://forum.cmsmadesimple.org/viewtopi ... =4&t=49995
one has to implement the task functionality inside a class that should be put in /lib/tasks directory.
So, what is the best way of achieving this in a typical module installation/removal ? I mean, how can I install this task class file as a part of the installation procedure? Should I copy it explicitly to the root_path/lib/tasks directory or is there another way ?
By the way, i am using cmsms 1.10.3