I have a web form, with text inputs for crontab values (minutes/hours/months/days), and I want to display user the next date of selected crontab task execution. For example, i have a values
20 15 15 * *, and the expected result will be: "Next run: 15.06.2013, 15-20"
Do you know any suitable javascript library?
There is a library called Later.js
which works like this
<!DOCTYPE html>
<html>
<body>
</body>
<script src="https://raw.github.com/bunkat/later/master/later.min.js" type="text/javascript"></script>
<script type="text/javascript">
// create the desired schedule
// calculate the next 5 occurrences with a minimum resolution of 60 seconds, using local time
var s = cronParser().parse('* */5 * * * *', true);
var results = later(60, true).get(s, 20);
document.write('<p>Next Run:' + results[1].toLocaleString() + '</p>');
</script>
</html>
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