Easiest way to do this is with a cronjob. You'll need to write your own module and define a cron in there
config.xml
<config> <modules> <[Namespace]_[Module]> <version>1.0.0</version> </[Namespace]_[Module]> </modules> <global> <models> <[namespace]_[module]> <class>[Namespace]_[Module]_Model</class> </[namespace]_[module]> </models> </global> <crontab> <jobs> <[namespace]_[module]_switchgroup> <schedule><cron_expr>* * */1 * *</cron_expr></schedule> <run><model>[namespace]_[module]/cron::setGroup</model></run> </[namespace]_[module]_switchgroup> </jobs> </crontab> </config>
[Namespace]/[Module]/Model/Cron.php
class [Namespace]_[Module]_Model_Cron { public function setGroup() { $collection = Mage::getModel('customer/customer')->getCollection() ->addAttributeToFilter('created_at', array('lteq' => date('Y-m-d', strtotime('-1 month')))) ->addAttributeToFilter('group_id', [old group id]); foreach ($collection as $_customer) { $_customer->setGroupId([the updated id]); $_customer->save(); } } }
might need some tweaking here and there but it basically looks for all 1 month old customers with a customer group ID once per day and updates them to the new group