diff --git a/api/jobs.go b/api/jobs.go index a9011189731d..c9921c9fd3bf 100644 --- a/api/jobs.go +++ b/api/jobs.go @@ -822,7 +822,7 @@ func (p *PeriodicConfig) Canonicalize() { // returned. The `time.Location` of the returned value matches that of the // passed time. func (p *PeriodicConfig) Next(fromTime time.Time) (time.Time, error) { - if *p.SpecType == PeriodicSpecCron { + if p != nil && *p.SpecType == PeriodicSpecCron { e, err := cronexpr.Parse(*p.Spec) if err != nil { return time.Time{}, fmt.Errorf("failed parsing cron expression %q: %v", *p.Spec, err) diff --git a/command/job_run.go b/command/job_run.go index 46e9699f9666..7e7090f1646c 100644 --- a/command/job_run.go +++ b/command/job_run.go @@ -349,9 +349,6 @@ func (c *JobRunCommand) Run(args []string) int { evalID := resp.EvalID - // #13844: canonicalize the job in case it was a partial API definition - job.Canonicalize() - // Check if we should enter monitor mode if detach || periodic || paramjob || multiregion { c.Ui.Output("Job registration successful")