Skip to content

add cronjob#1553

Merged
james00012 merged 2 commits intomainfrom
add-cronjob
May 8, 2025
Merged

add cronjob#1553
james00012 merged 2 commits intomainfrom
add-cronjob

Conversation

@james00012
Copy link
Copy Markdown
Contributor

Description

Fixes #1040.

TODOs

Read the Gruntwork contribution guidelines.

  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.
  • Include release notes. If this PR is backward incompatible, include a migration guide.
  • Make a plan for release of the functionality in this PR. If it delivers value to an end user, you are responsible for ensuring it is released promptly, and correctly. If you are not a maintainer, you are responsible for finding a maintainer to do this for you.

Release Notes (draft)

Added / Removed / Updated [X].

Migration Guide

@james00012 james00012 self-assigned this May 7, 2025
// IsCronJobSucceeded returns true if cron job successfully scheduled and completed job.
// https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/cron-job-v1/#CronJobStatus
func IsCronJobSucceeded(cronJob *batchv1.CronJob) bool {
return cronJob.Status.LastScheduleTime != nil
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be checked LastSuccessfulTime to know for sure if job succeeded?

@james00012 james00012 merged commit ef4d8ef into main May 8, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests support for CronJob

3 participants