Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Request: Make cronnext's output be YAML #190

Open
@petdance

Description

@petdance

I'd like to process the output of cronnext using tools likeyq. The output that cronnext gives is mostly YAML-like, but not entirely so.

This crontab line:

15 17 * * * echo "Out of my brain on the train" > /tmp/foo.log

gets printed by cronnext as:

next: 1726006500nextjobs:  - user: alester    cmd: "echo "Out of my brain on the train" > /tmp/foo.log"    flags: 0x0C    flagnames: DOM_STAR|DOW_STAR    delay: 0    next: 1726006500    nextstring: Tue Sep 10 17:15:00 2024

but a tool likeyq can't parse that because the double quotes in the cmd: value aren't escaped. It would be fine if it was:

next:1726006500nextjobs:  -user:alestercmd:"echo\"Out of my brain on the train\" > /tmp/foo.log"flags:0x0Cflagnames:DOM_STAR|DOW_STARdelay:0next:1726006500nextstring:Tue Sep 10 17:15:00 2024

I understand that nowhere doescronnext say that its output is YAML, and it would be great if it could be made so. If you didn't want to change the output because existing tools that use the output could break, an optional--yaml option to make the strict YAML format output would work, too.

I don't know what other things might have to change in the output to be correct YAML. I know there are a bunch of special characters and sequences that need to be escaped, but I don't know the full list. I figure there are plenty of libraries out there to do the dirty work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp