adhocore / gronx

Lightweight, fast and dependency-free Cron expression parser (due checker, next/prev due date finder), task runner, job scheduler and/or daemon for Golang (tested on v1.13+) and standalone usage. If you are bold, use it to replace crontab entirely.
https://github.com/adhocore/gronx
MIT License
422 stars 25 forks source link

gracefully shutdown #40

Closed lichunqiang closed 8 months ago

lichunqiang commented 8 months ago

it exits gracefully when ctrl+c is received making sure pending tasks are completed.

if there is one task like * * * * *, ctrl+c the program will hug on.

how to understanding pending tasks ?

adhocore commented 8 months ago

the pending here means already in progress or already scheduled, i.e not yet finished

adhocore commented 8 months ago

i found that when running tasker binary as daemon, it immediately aborts the child process on ctrl+c, will be fixed by #41