forked from vieter-v/vieter
refactor: link libvieter; remove cron code & daemon
This giant commit removes the old cron daemon & parser, replacing the latter with a C implementation that will now be maintained in a separate C library that gets developed independently. This commit lays the groundwork for implementing features of Vieter in C where possible.
This commit is contained in:
parent
bfd28d6f70
commit
beb90d5756
26 changed files with 278 additions and 916 deletions
|
|
@ -1,7 +1,7 @@
|
|||
module schedule
|
||||
|
||||
import cli
|
||||
import cron.expression { parse_expression }
|
||||
import cron
|
||||
import time
|
||||
|
||||
// cmd returns the cli submodule for previewing a cron schedule.
|
||||
|
|
@ -19,10 +19,10 @@ pub fn cmd() cli.Command {
|
|||
},
|
||||
]
|
||||
execute: fn (cmd cli.Command) ! {
|
||||
ce := parse_expression(cmd.args.join(' '))!
|
||||
ce := cron.parse_expression(cmd.args.join(' '))!
|
||||
count := cmd.flags.get_int('count')!
|
||||
|
||||
for t in ce.next_n(time.now(), count)! {
|
||||
for t in ce.next_n(time.now(), count) {
|
||||
println(t)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue