Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
Can I call a Task within a controller?
onema
January 2013
I would like to give an option in my admin panel to fire some tasks without having to wait for a cron job to execute it.
Is there a way to easily do this?
I would have thought that is as simple as using the class like this:
Fuel\Tasks\MyTask::run();
but if I do that I get the following error message:
ErrorException [ Error ]: Class 'Fuel\Tasks\MyTask' not found
Any way to do this?
Thank you.
Harro
January 2013
You have to load the class manually. They don't use the cascading filesystem, so the autoloader can't load them.
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,088
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
260
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Harro
January 2013