1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

feat(api): add created property for schedules (#2435)

This commit is contained in:
Anthony Lapenna 2018-11-07 09:22:30 +13:00 committed by GitHub
parent 110fcc46a6
commit 7d32a6619d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 5 deletions

View file

@ -3,6 +3,7 @@ package schedules
import (
"errors"
"net/http"
"time"
"github.com/asaskevich/govalidator"
httperror "github.com/portainer/libhttp/error"
@ -155,6 +156,7 @@ func (handler *Handler) createSchedule(name, image, cronExpression string, endpo
CronExpression: cronExpression,
JobType: portainer.ScriptExecutionJobType,
ScriptExecutionJob: job,
Created: time.Now().Unix(),
}
jobContext := cron.NewScriptExecutionJobContext(handler.JobService, handler.EndpointService, handler.FileService)