3

I been trying schedule a job with clockwork to run only on day eg. February 14. But I'm not sure if is this possible because the documentation formats do not have this possibility.

I know that I can do something like this:

Clockwork.every(1.day, 'valentines_day_job', if: lambda { |t| t.day == 14 && t.month == 2 })

But I would like to avoid unnecessary verification every day.

Any ideas?

Thank you.

monteirobrena
  • 2,562
  • 1
  • 33
  • 45

1 Answers1

0

to make this work, change 1.day to 1.year

Fdwillis
  • 1,050
  • 9
  • 21