Created
March 8, 2012 20:41
-
-
Save mcansky/2003308 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "iron_worker_ng" | |
| code = IronWorkerNG::Code::Ruby.new | |
| code.merge_worker "#{Rails.root}/app/workers/test_iron.rb" | |
| # ...and upload it to iron.io cloud | |
| client = IronWorkerNG::Client.new(Settings.iron_worker.token, Settings.iron_worker.project_id) | |
| client.codes.create(code) | |
| # :host, :port, :ssl, :payload, :url, :token, :username | |
| client.tasks.create('TestIron', 'foo' => 42) | |
| client.schedule(:start_at => 30.seconds.since, :run_every => 300, :run_times => 5) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
run times is optional