Skip to content

Conversation

@DrAuYueng
Copy link

Copy link

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

this lgtm

CybotTM added a commit to netresearch/go-cron that referenced this pull request Nov 25, 2025
Bug robfig#554/robfig#555: TZ= parsing panic
- Added bounds check for space index in timezone parsing
- Returns error instead of panicking when spec has no fields after timezone
- Added comprehensive tests for malformed timezone specs

Bug robfig#551: Entry.Job.Run() bypasses chain decorators
- Added Entry.Run() method that executes through WrappedJob
- Ensures SkipIfStillRunning, DelayIfStillRunning, Recover are respected
- Added tests validating chain behavior

Tests: All new panic-prevention tests pass
CybotTM added a commit to netresearch/go-cron that referenced this pull request Nov 25, 2025
- Update badges and import paths for the fork
- Document panic fixes (issues robfig#554, robfig#555, robfig#551)
- Document DST handling improvements (PR robfig#541)
- Update Go version requirement to 1.25
- Simplify and modernize documentation structure
CybotTM added a commit to netresearch/go-cron that referenced this pull request Nov 25, 2025
Modernize the robfig/cron fork with critical bug fixes and improvements.

## Bug Fixes
- Fix TZ timezone parsing panic when spec has no fields after TZ prefix (robfig#554, robfig#555)
- Fix nil pointer panic in Entry.Run() when WrappedJob is nil (robfig#551)

## Enhancements
- Implement ISC cron DST behavior for spring forward (robfig#541)
- Upgrade to Go 1.25
- Finalize module path as github.com/netresearch/go-cron

## CI/Quality
- Add comprehensive GitHub Actions CI workflow
- Add golangci-lint v2 configuration
- Add Dependabot for dependency updates
- Fix deprecated io/ioutil usage

## Documentation
- Update README for fork with migration instructions
- Document all fixes and improvements

All tests pass. Successfully integrated into Ofelia with full test coverage.
CybotTM added a commit to netresearch/go-cron that referenced this pull request Nov 26, 2025
Add comprehensive changelog following Keep a Changelog format:
- Document all features added since fork from robfig/cron
- List bug fixes for upstream issues robfig#551, robfig#554, robfig#555
- Include security improvements and validation changes
- Add migration guide from robfig/cron
- Document differences comparison table
- Note planned v2 features

Closes #22
CybotTM added a commit to netresearch/go-cron that referenced this pull request Nov 26, 2025
Add comprehensive changelog following Keep a Changelog format:
- Document all features added since fork from robfig/cron
- List bug fixes for upstream issues robfig#551, robfig#554, robfig#555
- Include security improvements and validation changes
- Add migration guide from robfig/cron
- Document differences comparison table
- Note planned v2 features

Closes #22
CybotTM added a commit to netresearch/go-cron that referenced this pull request Nov 28, 2025
Create docs/MIGRATION.md with detailed migration documentation:

- Quick start section with import path and go.mod changes
- Go version requirements comparison
- Behavioral differences with before/after examples:
  - TZ= parsing panic fixes (robfig#554, robfig#555)
  - Entry.Run() chain behavior fix (robfig#551)
  - DST spring-forward handling (robfig#541)
  - Step range validation (robfig#543)
  - Input length limits
- Type changes (EntryID: int -> uint64)
- New features overview (FakeClock, StopAndWait, Timeout, heap scheduling)
- Migration checklist
- Testing recommendations with code examples
- Troubleshooting section

Also update README.md to link to the comprehensive migration guide.

Closes #73
CybotTM added a commit to netresearch/go-cron that referenced this pull request Nov 28, 2025
Create docs/MIGRATION.md with detailed migration documentation:

- Quick start section with import path and go.mod changes
- Go version requirements comparison
- Behavioral differences with before/after examples:
  - TZ= parsing panic fixes (robfig#554, robfig#555)
  - Entry.Run() chain behavior fix (robfig#551)
  - DST spring-forward handling (robfig#541)
  - Step range validation (robfig#543)
  - Input length limits
- Type changes (EntryID: int -> uint64)
- New features overview (FakeClock, StopAndWait, Timeout, heap scheduling)
- Migration checklist
- Testing recommendations with code examples
- Troubleshooting section

Also update README.md to link to the comprehensive migration guide.

Closes #73
@CybotTM
Copy link

CybotTM commented Dec 4, 2025

Solution available in maintained fork

This issue has been fixed in netresearch/go-cron, a maintained fork of this library.

Fix: NewParser(0) now returns an error with message "at least one field or Descriptor must be configured" instead of panicking or creating an invalid parser.

How to migrate:

// Change import from:
import "github.com/robfig/cron/v3"

// To:
import cron "github.com/netresearch/go-cron"

The API is 100% backward compatible. See the migration guide for details.

Related: netresearch#31

@zhangguanzhang
Copy link

@robfig PTAL

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.

cron.ParseStandard("TZ=0") causes panic

4 participants