Skip to content
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

Minute Error #124

Open
suaterkilic opened this issue Jun 4, 2021 · 1 comment
Open

Minute Error #124

suaterkilic opened this issue Jun 4, 2021 · 1 comment

Comments

@suaterkilic
Copy link

suaterkilic commented Jun 4, 2021

Hello,

This library is great! but I have a problem.

this my code;

                $scheduler->php(__DIR__ . "/" . $taskFile)
                ->onlyOne()
                ->output([
                    'mylog.log'
                ])
                ->at("*/$taskTime * * * *");

I set the time as 10080 minutes or 569 minutes but the system is doing the task every hour. Why? what should i do?

@peppeocchi
Copy link
Owner

Hi @suaterkilic I am not sure what you mean, you set */10080 * * * *? You can only set values between 0 and 59 as a valid cron expression (ref)
It might be better to understand what you are trying to do, in your use case it might work a Datetime execution, for example if $taskTime is calculated based on - e.g.- a last check and you want to add 10080 minutes to that last check, you might calculate a specific date and time and set it like

$scheduler->php('script.php')->date(new DateTime('2021-08-01 12:39'));

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

No branches or pull requests

2 participants