MCPcopy Create free account
hub / github.com/cronitorio/cronitor-cli / CrontabFactory

Function CrontabFactory

lib/crontab.go:833–840  ·  view source on GitHub ↗
(username, filename string)

Source from the content-addressed store, hash-verified

831}
832
833func CrontabFactory(username, filename string) *Crontab {
834 return &Crontab{
835 User: username,
836 IsUserCrontab: strings.HasPrefix(filename, "user:"),
837 Filename: filename,
838 Shell: "/bin/sh", // Default shell if none is specified
839 }
840}
841
842func ReadCrontabsInDirectory(username, directory string, crontabs []*Crontab) []*Crontab {
843 files := EnumerateFiles(directory)

Callers 6

discover.goFile · 0.92
processDirectoryFunction · 0.92
handlePostCrontabsFunction · 0.92
ReadCrontabsInDirectoryFunction · 0.85
ReadCrontabFromFileFunction · 0.85
GetAllCrontabsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected