fix: add missing cron:set command

The code existed but somehow it wasn't exposed as a command.

Closes #6655
This commit is contained in:
Jose Diaz-Gonzalez
2024-03-06 01:56:14 -05:00
parent 66623ba2af
commit c36f23b072
4 changed files with 20 additions and 5 deletions

View File

@@ -40,6 +40,19 @@ func main() {
appName := args.Arg(0)
cronID := args.Arg(1)
err = cron.CommandRun(appName, cronID, *detached)
case "set":
args := flag.NewFlagSet("cron:set", flag.ExitOnError)
global := args.Bool("global", false, "--global: set a global property")
args.Parse(os.Args[2:])
appName := args.Arg(0)
property := args.Arg(1)
value := args.Arg(2)
if *global {
appName = "--global"
property = args.Arg(0)
value = args.Arg(1)
}
err = cron.CommandSet(appName, property, value)
default:
err = fmt.Errorf("Invalid plugin subcommand call: %s", subcommand)
}