I need to develop a task system that should be able to work on servers that doesn't support crontab.
I'm asking if there is any existing code that can take a cron string (e.g. '0 0,12 1 */2 *' and return the timestamp of the next scheduled run.
If such a code couldn't be found then how should I start with that?
Listing Cron Jobs in Linux You can find them in /var/spool/cron/crontabs. The tables contain the cron jobs for all users, except the root user. The root user can use the crontab for the whole system. In RedHat-based systems, this file is located at /etc/cron.
*/5 * * * * Execute a cron job every 5 minutes. 0 * * * * Execute a cron job every hour.
A cron expression is a string that represents a set of times at which a task will be executed. The expression comprises six fields: second(0-59), minute(0-59), hour(0-23), day of month(1-31), month(1-12 or JAN-DEC), and day of week(0-6 or SUN-SAT).
The App Engine Cron Service allows you to configure regularly scheduled tasks that operate at defined times or regular intervals. These tasks are commonly known as cron jobs.
You could use this class PHP-Parse-cron-strings-and-compute-schedules
It'll also compute the last scheduled run
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With