Documentation ¶
Index ¶
- Variables
- func CommandList(appName string, format string) error
- func CommandReport(appName string, format string, infoFlag string) error
- func CommandRun(appName string, cronID string, detached bool) error
- func CommandSet(appName string, property string, value string) error
- func GenerateCommandID(appName string, c appjson.CronCommand) string
- func ReportSingleApp(appName string, format string, infoFlag string) error
- func TriggerCronGetProperty(appName string, key string) error
- func TriggerInstall() error
- func TriggerPostAppCloneSetup(oldAppName string, newAppName string) error
- func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error
- func TriggerPostDelete(appName string) error
- type TemplateCommand
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CommandList ¶
CommandList lists all scheduled cron tasks for a given app
func CommandReport ¶
CommandReport displays a cron report for one or more apps
func CommandRun ¶
CommandRun executes a cron command on the fly
func CommandSet ¶
CommandSet set or clear a cron property for an app
func GenerateCommandID ¶
func GenerateCommandID(appName string, c appjson.CronCommand) string
GenerateCommandID creates a unique ID for a given app/command/schedule combination
func ReportSingleApp ¶
ReportSingleApp is an internal function that displays the cron report for one or more apps
func TriggerCronGetProperty ¶
TriggerCronGetProperty writes the cron key to stdout for a given app container
func TriggerInstall ¶
func TriggerInstall() error
TriggerInstall runs the install step for the cron plugin
func TriggerPostAppCloneSetup ¶
TriggerPostAppCloneSetup creates new cron files
func TriggerPostAppRenameSetup ¶
TriggerPostAppRenameSetup renames cron files
func TriggerPostDelete ¶
TriggerPostDelete destroys the cron property for a given app container
Types ¶
type TemplateCommand ¶
type TemplateCommand struct { // ID is a unique identifier for the cron command ID string `json:"id"` // App is the app the cron command belongs to App string `json:"app"` // Command is the command to run Command string `json:"command"` // Schedule is the cron schedule Schedule string `json:"schedule"` // AltCommand is an alternate command to run AltCommand string `json:"-"` // LogFile is the log file to write to LogFile string `json:"-"` }
TemplateCommand is a struct that represents a cron command
func FetchCronEntries ¶
func FetchCronEntries(appName string) ([]TemplateCommand, error)
FetchCronEntries returns a list of cron commands for a given app
func (TemplateCommand) CronCommand ¶
func (t TemplateCommand) CronCommand() string
CronCommand returns the command to run for a given cron command