Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Can tasks be executed from the command line without oil
  • Is there a way I can execute a task without using oil. If so could I still use the FuelPHP framework / MVC mechanism? If so how/what would need to bootstrap the framework.
  • Hello !
    I never try to use tasks but I think that you should look after CRON tasks on server ;)
    With this you can fire planned commands !
  • No.

    A task is a commandline controller, you can't run it without bootstrapping the framework.

    What is the problem with using oil? It is just a few lines long frontloader?
  • I don't usually use it for anything else. Why not create another entry point (similar to index.php and bootstrap.php) but for CLI /tasks - as opposed to invoking a 'special tool' (Oil)
  • or perhaps add a script which could be included at the top of each task..... that way you could just go

    php tasks/mytask.php <parameters>

    like normal
  • oil is a separate entry point, it contains the same startup code as index.php.

    Please explain to me what you think the difference will be between

    oil r mytask <parameters>

    and 

    php tasks/mytask.php <parameters>

    Both have to do exactly the same thing, you are just making it a lot complexer.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion