desc "Some description" task :my_work_task, [:option, :foo, :bar] => :environment do |task, args| puts "my work", args end Run it: bin/rails 'work[optionValue,fooValue,barValue]'