1

I'm building a small reminder application in Rails and I want to add the ability for my users to be able to create a cron job. The cron job would run on a given day each week, each month or even one time depending on the users selection and save.

So the user creates the even, selects if its weekly, daily or one time, then it creates the cron job to run a command line in linux.

Any gems for that to be easier?

user1924165
  • 99
  • 1
  • 10
  • 1
    Would it not be easier, to post user reminders (when they set them, how often they should run, when it was last run etc) then set up a cron job that points to a page that reads that database and figures ou t what reminders it should send? – andy Jan 09 '13 at 14:59
  • 1
    Here is your answer http://stackoverflow.com/questions/285717/a-cron-job-for-rails-best-practices – Satish Jan 09 '13 at 15:03

1 Answers1

0

The common way would be to have database table with maybe:

status | linux_command | execute_at

and to run every 10 mins a cronjob witch checks the database and executes the command.

SG 86
  • 6,974
  • 3
  • 25
  • 34