hugoabonizio / schedule.cr

:clock3: Run periodic tasks in Crystal

Home Page:https://hugoabonizio.github.io/schedule.cr/Schedule.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nested schedule

Dan-Do opened this issue · comments

commented

Thanks for this useful shard. I have a question:

Schedule.every(1.minutes) do
  count = 1
  foo = get_true_or_false
  if foo
    Schedule.every(:day) do
      bar
    end
  end
  Schedule.stop if foo
end

Does the if foo Schedule.every(:day)... still runs if Schedule.stop if foo reached?