Search code examples
iron.ioironworker

How to schedule a task to run regularly in iron.io


I have a worker which is up and running without errors. I would like to schedule tasks to run every morning at 9.30 using the CLI. Documentation is a little confusing when it comes to scheduling regular tasks using CLI. What I would try is joining iron_worker schedule worker --start-at "2014-07-22T09:30:00-04:00" and iron_worker schedule worker --run-every 1440 commands somehow. By the way what does the 4:00 at the end of the first command mean? Thanks.


Solution

  • iron_worker schedule --help is good reading ;)

    I think command would looks like

    iron_worker schedule code_name --start-at "2014-07-22T09:30:00-04:00" --run-every 86400
    

    where "-04:00" is timezone,

    86400 - interval between executions (24 * 60 * 60 seconds = 1 day)

    Also, you could use UI - http://hud.iron.io/ -> project -> Scheduled Tasks to create new schedule