Skip to content

handle system date changes #16

@hcodina

Description

@hcodina

Hi,
I have a problematic use case and before i fill a github issue, i would like to know your opinion about it.

Let's say we are the October 11 2018.
I have cron jobs scheduled "@hourly" and "@daily" and everything is correct.

I manually change my system date and i set it to January 01 2000.
I have the impression that my jobs will never be run until October 2018 (18 years to wait).
I expect my job to be scheduled one hour or one day after their last run or at least one hour one day after my date change
but not 18 year.

I would like to known what kind of workaround we can do to handle this use case.

In main.c you handle "big" delta as :

if (dt < -60*60 || dt > 60*60) {
	t1 = t2;
	printlogf(LOG_NOTICE,"time disparity of %d minutes detected\n", dt / 60);
}

Maybe we can add something to fix cl_LastRan + timestamp file, cl_NotUntil values in this block.

What do you think about this idea ?
Do you have any other idea to handle system date changes in order to keep @xxxx jobs scheduled hourly, daily, ... ?

Best regards,
Herve Codina

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