Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/daschr/sqlite3_extensions

collection of sqlite3 extensions
https://github.com/daschr/sqlite3_extensions

cron sqlite3 sqlite3-extension

Last synced: 8 days ago
JSON representation

collection of sqlite3 extensions

Awesome Lists containing this project

README

        

# sqlite3_extensions
collection of sqlite3 extensions

## cron.c

* `cron_match(date text, cron_entry text)` allows you to compare dates against cron entries, whether they match or not
* f.e.:
* `select cron_match('2000-01-01 00:03:00', '*/3 * * * *');` returns 1
* `select date from test1 where cron_match(date, '*/9 */10 * * *');` returns
|date|
|:------------------|
|2000-01-04 10:27:00|
|2000-01-04 10:36:00|
|2000-01-04 10:45:00|
|2000-01-04 10:54:00|
|2000-01-04 20:00:00|
|2000-01-04 20:09:00|
|2000-01-04 20:18:00|
|2000-01-04 20:27:00|
|2000-01-04 20:36:00|
|2000-01-04 20:45:00|
|2000-01-04 20:54:00|
|2000-01-05 00:00:00|
|2000-01-05 00:09:00|
|2000-01-05 00:18:00|
|2000-01-05 00:27:00|
|2000-01-05 00:36:00|
|2000-01-05 00:45:00|
|2000-01-05 00:54:00|
|2000-01-05 10:00:00|
|2000-01-05 10:09:00|
|2000-01-05 10:18:00|
|2000-01-05 10:27:00|
|2000-01-05 10:36:00|