[TYPO3-dev] Scheduler: Task disables itself automatically

Francois Suter fsu-lists at cobweb.ch
Tue Mar 9 13:38:33 CET 2010


Hi Roberto,

> BUT: If the task is executed via Cron, its being disabled the first time its
> supposed to run. It's being disabled even before the actual run() method in
> the task class is called. From now on the task isn't executed anymore -
> cause its disabled of course.
>
> What could be the cause for this? Please help me out! I'm desperate!

This whole automatic disabling was a bit tricky and it's possible that 
there are still bugs hidden in there. It takes place in 
tx_scheduler::saveTask() so you might want to take a deeper look at what 
happens there to track down the issue. As you will see if you look 
there, the task is disabled if the getNextDueExecution() method of the 
task threw an exception. So this is probably where the problem is happening.

BTW try setting your task's frequency using cron syntax (that would be 
*/5 * * * * in your case) to see if the problem still happens (this is 
just to know whether it is related to having the frequency in seconds 
rather than in cron syntax). Of course, it should work with frequency in 
seconds too, but it's just a test.

HTH

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch




More information about the TYPO3-dev mailing list