![]() |
Custom Module that Runs Every Hour
I've got a blank new module. How would I go about adding some functionality to get my module to push product information to a third party every hour?
I'm totally new to writing modules for X-Cart. How do I find what functions I can extend/override? PHP Code:
|
Re: Custom Module that Runs Every Hour
You want to tap into X-Cart 5's cron jobs. You will see a database table called tasks that lists these jobs.
http://kb.x-cart.com/pages/viewpage.action?pageId=7504112 --this is how you setup your server to run X-Cart's cron. In your YAML file you put something like this: Code:
XLite\Model\Task: Then you further define the task in your Sync.php like this: Code:
namespace XLite\Module\DevId\ModuleName\Core\Task; You can see that my example refers to an updateInterval you create such a setting in your YAML file like this: Code:
XLite\Model\Config: |
All times are GMT -8. The time now is 01:36 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.