chore: add cron-expression to get value from flag

This commit is contained in:
Jonas Kaninda
2024-09-28 08:32:04 +02:00
parent 050f5e81bc
commit 7912ce46ed

View File

@@ -71,6 +71,7 @@ func initDbConfig(cmd *cobra.Command) *dbConfig {
} }
func initBackupConfig(cmd *cobra.Command) *BackupConfig { func initBackupConfig(cmd *cobra.Command) *BackupConfig {
utils.SetEnv("STORAGE_PATH", storagePath) utils.SetEnv("STORAGE_PATH", storagePath)
utils.GetEnv(cmd, "cron-expression", "BACKUP_CRON_EXPRESSION")
utils.GetEnv(cmd, "period", "BACKUP_CRON_EXPRESSION") utils.GetEnv(cmd, "period", "BACKUP_CRON_EXPRESSION")
//Get flag value and set env //Get flag value and set env