Skip to content

Instantly share code, notes, and snippets.

@markshust
Last active December 13, 2017 04:44
Show Gist options
  • Save markshust/4444869 to your computer and use it in GitHub Desktop.
Save markshust/4444869 to your computer and use it in GitHub Desktop.
Magento - run cronjobs manually from CLI
<?php
/*
Given:
<foo_bar_baz>
<schedule>
<cron_expr>0 0 * * *</cron_expr>
</schedule>
<run>
<model>foo/bar::baz</model>
</run>
</foo_bar_baz>
*/
require_once 'app/Mage.php';
Mage::app();
$model = Mage::getModel('foo/bar');
$model->baz();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment