Passing multiple arguments in resque scheduler

Hi,

I have implemented resque scheduler in my application by looking at
example here https://github.com/bvandenbos/resque-scheduler. I have
configured resque_schedule.yml file, and in that I can pass arguments
to the resque job. My requirement is to pass more than one arguments
to the queueing resque job. If we consider the example given,

clear_leaderboards_contributors:
cron: “30 6 * * 1”
class: ClearLeaderboards
args: contributors
description: “This job resets the weekly leaderboard for
contributions”

Here I need to pass one more argument along with ‘contributors’.
Currently I have found work around for this. I am passing comma
separated list in args, and performing split action after collecting
arguments. I know there should be some other way to do this.

Thanks in advance.

need to use the yaml representation for the arguments. So, something
like this:

clear_leaderboards_contributors:
cron: 30 6 * * 1
class: ClearLeaderboards
args:
- blah
- more

Will result in an array of ['blah', 'more'] being passed in as args.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs