Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How to setup Tasks in a Cron Job
  • I have been searching everywhere and i get how tasks work, but i have no idea how to get them to work with a cron job, granted I haven't found a good source that explains how to set up a cron job as well.

    I want to use it to add information to a database to update a realm-time graph.

    If anyone could help me or direct me I would greatly appreciate it! :)
  • Do you know how to create a task in Fuel?

    You can create a record in cron something like this:
    * 1 * * * php /path/to/project/oil refine <taskname>

    This is just what I guess... I haven't tried it yet.
  • I have in my cron (/etc/cron.d/mytask):

    * 1 * * * root cd /path/to/my/fuel/install; env FUEL_ENV=production php oil refine mytask >> /data/logs/mytask.log 2>&1

    ( check your cron install if you need to specify the userid )

Howdy, Stranger!

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

In this Discussion