Answer the question
In order to leave comments, you need to log in
What is the best way to store crontime in database?
There is a table, let's say Emails, which stores email addresses.
The site interface has a form that specifies the "interval" for each email address in crontime format.:
email | timeline
[email protected] | */5 * * * *
Answer the question
In order to leave comments, you need to log in
Use the mtdowling/cron-expression library .
She knows how to analyze cron-style intervals.
Idea such:
1. It is necessary to pull out all records from basis.
2. For each entry, find out the next start time.
3. If it matches the current minute, then complete the task.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question