I am trying to create a cronjob that will run my script (which imports an XML files) on a set time. For now I put it to run every 2 min., just for testing purposes.
What I've done is just add the following code in the config.xml
of the particular module, that takes care of the importing:
<crontab>
<jobs>
<productimporter_import_xml>
<schedule>
<cron_expr>*/2 * * * *</cron_expr>
</schedule>
<run>
<model>productimporter/catalog_importer::_importFile</model>
</run>
</productimporter_import_xml>
</jobs>
</crontab>
So, the module in the local code is called ProductImporter, and the script is ProductImporter/Model/Catalog/Importer.php
and _importFile
is the initial function.
Apparently this doesn't work. Is there something else that has to be set, additionally to the config.xml
? Or maybe I haven't done my setting correctly (perhaps the path), I don't a real clue...