Skip to content

feat: implement scheduled recurring scans with blackout windows (#253)#482

Open
YerraguntaAjayKumar wants to merge 1 commit into
utksh1:mainfrom
YerraguntaAjayKumar:feature/recurring-scans-253
Open

feat: implement scheduled recurring scans with blackout windows (#253)#482
YerraguntaAjayKumar wants to merge 1 commit into
utksh1:mainfrom
YerraguntaAjayKumar:feature/recurring-scans-253

Conversation

@YerraguntaAjayKumar
Copy link
Copy Markdown

Description

Implemented a cron-like scheduling service to automate recurring scans. This includes a robust croniter-based parser with zoneinfo timezone handling, an interceptor to evaluate blackout windows (including overnight shifts), and a conservative missed-run recovery policy to safely handle system downtime. Additionally, built a responsive React UI (ScanScheduleForm) with strict client-side validation enforcing 5-part cron syntax.

Related Issues

Fixes #253

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • Executed the backend test suite (./testing/test_scheduler.py), verifying all 19 tests pass for timezone boundaries, blackout skips, missed-run recovery, and disabled schedules.
  • Added 40+ frontend unit tests in ScanScheduleForm.test.jsx.
  • Manually verified UI rendering locally and tested strict validation rejections on malformed inputs (invalid cron strings, mismatched blackout windows).

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.

@YerraguntaAjayKumar YerraguntaAjayKumar force-pushed the feature/recurring-scans-253 branch from a691ba2 to 8069213 Compare June 3, 2026 03:59
…h1#253)

- Add croniter-based cron parser with timezone support (zoneinfo)
- Implement blackout window interceptor for maintenance windows
- Add missed-run recovery policy for system resilience
- Create React ScanScheduleForm component with validation
- Add comprehensive test coverage (19 backend, 40+ frontend tests)
- Validate cron syntax and time formats on both client and server

Closes utksh1#253
@YerraguntaAjayKumar YerraguntaAjayKumar force-pushed the feature/recurring-scans-253 branch from 8069213 to 6a3912d Compare June 3, 2026 04:02
@YerraguntaAjayKumar
Copy link
Copy Markdown
Author

Hi @utksh1, the implementation is complete and all CI/CD checks are green! It is ready for your review whenever you have a moment. Let me know if you'd like any adjustments to the blackout window logic or the frontend React components

@utksh1 utksh1 added level:advanced 55 pts difficulty label for advanced contributor PRs type:feature Feature work category bonus label type:testing Testing work category bonus label area:frontend Frontend React/UI work area:backend Backend API, database, or service work labels Jun 4, 2026
Copy link
Copy Markdown
Owner

@utksh1 utksh1 left a comment

Choose a reason for hiding this comment

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

Thanks for the work here. I cannot merge this in its current shape because the feature is mostly standalone and not integrated into the existing SecuScan scheduling flow.

Required changes:

  • Wire the scheduling model/API/UI into the existing scan/workflow creation path so users can actually create, list, update, and execute recurring scans from the app.
  • Convert the frontend work to the repo conventions (.tsx, existing styling/layout patterns, existing test location/naming). The current new JSX/CSS module component sits outside the current UI system and is not reachable.
  • Avoid adding a parallel scheduler utility that duplicates existing scheduler/workflow behavior unless it is explicitly integrated with the production scheduler.
  • Make the missed-run recovery logic deterministic/testable; the current tests mostly assert return types because the code calls wall-clock datetime.now() directly.

Once this is wired into the real product path and covered with meaningful integration tests, I can re-review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend Backend API, database, or service work area:frontend Frontend React/UI work level:advanced 55 pts difficulty label for advanced contributor PRs type:feature Feature work category bonus label type:testing Testing work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add scheduled recurring scans with blackout windows

2 participants