View Single Post
  #1  
Old 04-15-2015, 11:45 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Handling cron jobs / scheduled tasks

Hi guys and gals,

I am building an integration with an inventory management app and we need to run code based on a cron job or scheduled task.

I have found this article: http://kb.x-cart.com/pages/viewpage.action?pageId=7504112 and I now understand that the entry point for cron jobs is console.php

What I don't understand is the proper way to include my viewer or controller class in with the group that is run by console.php

I have found this class XLite\Controller\Console\AConsole.php and when I put error_log() in one of its methods the log is created. So I know that it is running when a request is made to console.php

My question is: How do I include my code in this cron job? Do I need to extend or decorate a certain class? Perhaps I add my class to a certain list?

Thanks in advance for any help.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote