Closed Mitchell-Hampton closed 6 years ago
Hello,
Is there a way to pass arguments to the schedules.
I want to do something similar to the following: for (int i = 0; i < 10; i++) s.cron(" *", []() { std::cout << "top of every minute "<< i << std::endl; });
however this will have all the schedules print 9.
I was able to get it to work with s.cron(temp_cron, [&, i]() {std::cout << "top of every minute "<< i << std::endl; });
Hello,
Is there a way to pass arguments to the schedules.
I want to do something similar to the following: for (int i = 0; i < 10; i++) s.cron(" *", []() { std::cout << "top of every minute "<< i << std::endl; });
however this will have all the schedules print 9.