How to setup a cron job in Magento module?

前端 未结 5 1000
温柔的废话
温柔的废话 2020-12-01 09:45

I wanted to setup a cron job inside my module. I followed the instructions on Magento wiki - how_to_setup_a_cron_job, but my cron job is simply not executing.

This i

5条回答
  •  隐瞒了意图╮
    2020-12-01 10:15

    In your modules config.xml put the following:

    
        
            
                
                    Roomstory_Invoice_Model
                                         
            
        
        
            
                
                    
                        */10 * * * *
                    
                    
                        roomstoryinvoicecron/observer::setStatus
                    
                
            
        
    
    

    In app/code/local/Roomstory/Invoice/Model/Observer.php add the following:

    Make sure logging is enabled and it should work, check the log to be sure ;)

提交回复
热议问题