Skip to content

Previous n dates #20

@Steve-Mcl

Description

@Steve-Mcl

Hi @jaclarke

I am writing to request (if not difficult) would you be able to implement a prevNDates (like the reverse of nextNDates)?

I will explain my logic and you might have a better idea.

Say an application has a schedule of 0 0 13 * * * (run at 1pm) and the application was offline at 13:00. I would like to know what the last time if should have ran. NOTE: I have no way of knowing it was supposed to run at 13:00 as this is user configured.

I guess I could call nextNDates with a time in the past however if the schedule happened to be something like 0 0 13 * 1 * then I would have to loop back to January.

Any hints would be great.

Thanks, Steve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions