Skip to content

Bring flags in line with crontab command #25

@jacobtomlinson

Description

@jacobtomlinson

One of the goals of krontab is to replace crontab for systems which live on a Kubernetes cluster (e.g pangeo/z2jh). Therefore ideally I would like it to have a superset of crontab's flags.

Looking at the crontab man page there are some flags which haven't been implemented yet.

Flags

  • -l List the crontab. This should list all kubernetes CronJob resources in a crontab format.
  • -e Edit the crontab. This should open all kubernetes CronJob resources in an editor (either system default or that configured with VISUAL/EDITOR) in a crontab format. Then changes should be propagated back to the Kubernetes API.
  • -u Modify the crontab of another user. This could be used to override the KRONTAB_OWNER config setting.
  • -r Remove the current crontab. This should delete all the CronJob resources, however this is a bit scary ⚠️. We should probably prompt the user to confirm.
  • -i Modifies the -r flag to prompt the user to confirm y/n. This should possibly be the default and use a -y to force without confirmation. Therefore maybe we should just stub this out.
  • -s Changes the SELinux context of the crontab file before editing. Probably not necessary in krontab but we should stub it out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions