lib/ductr/cli/main.rb in ductr-0.1.0 vs lib/ductr/cli/main.rb in ductr-0.1.1
- old
+ new
@@ -25,9 +25,11 @@
sleep(0.1) until Store.all_done?
end
desc "schedule, s [SCHEDULERS]", "Run the given schedulers"
def schedule(*scheduler_names)
+ raise ArgumentError, "You must pass at least one scheduler name" if scheduler_names.empty?
+
scheduler_names.each { |name| name.camelize.constantize.new }
Scheduler.start
sleep_until_interrupt do
Scheduler.stop