Skip to content

add cronjob #1553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 8, 2025
Merged

add cronjob #1553

merged 2 commits into from
May 8, 2025

Conversation

james03160927
Copy link
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

@james03160927 james03160927 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
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?

@james03160927 james03160927 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