3

How do I test an IronWorker task locally using the CLI?

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501

2 Answers2

4
iron_worker run worker_name -p '{"foo":"bar","baz":[1,2,3]}'

where optional "-p" flag - payload

thousandsofthem
  • 1,355
  • 10
  • 9
0

Assuming you have Docker installed you can also run your worker locally using a Docker command:

$ docker run --rm -v "$(pwd)":/worker -w /worker iron/php sh -c 'php name_of_worker.php'

Just make sure your Docker Quickstart Terminal is up and running.

If it works on Docker then it will work on IronIO. As stated in the Iron docs here.

Evan Butler
  • 659
  • 1
  • 6
  • 13