Synopsis
First of all I wish to express how a third-party extension to list the crobjobs is not what I am looking for, I shall omit my opinion for how Magento handles cronjobs.
My problem is when I query the database SELECT * FROM cron_schedule; my modules cron is not listed there, thus I can only assume my cron configuration is wrong, but so far I've not found any resources to help.
Cron set-up
My cron has been set-up on the server to run every 5 minutes (this is where I dislike Magento abstracting cronjobs).
crontab -e
*/5 * * * * /bin/sh /home/site/public_html/cron.sh > /dev/null &2>1
For the exercise of getting my cron to run, I am running the cron from the command line $ /bin/sh cron.sh - Inside the cron_schedule I see that executed_at is updated but not for my cronjob but an existing modules cron.
Snippet
config.xml
<config>
...
<crontab>
<jobs>
<myvendor_mymodule>
<schedule>
<cron_expr>0 0 * * *</cron_expr>
</schedule>
<run>
<model>myvendor_mymodule/cron::someMethod</model>
</run>
</myvendor_mymodule>
</jobs>
</crontab>
</config>
app/code/local/Myvendor/Mymodule/Model/Cron.php
class Myvendor_Mymodule_Model_Cron
{
//public static function someMethod() #= no luck either
public function someMethod()
{
Mage::log('test', null, 'hello.log');
}
}
crontab. Linux has implementedcrontabin a simple and elegant manner, imo Magento has just complicated the process by using databases and forking background processes then routing stout/stderr to/dev/null. As a server administrator myself I dislike my control being taken from me. – Ash Feb 14 '14 at 14:54cron_scheduleARGH! – Ash Feb 14 '14 at 14:58cron_scheduletable, which is why I thought it was theconfig.xmlsyntax. My question is what doesAOE_Schedulerdo thatSELECT * FROM cron_scheduledoesn't? – Ash Feb 14 '14 at 15:07