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

Some cron schedules are incorrectly interpreted as seconds #239

Closed
elahrvivaz opened this issue Feb 9, 2023 · 2 comments
Closed

Some cron schedules are incorrectly interpreted as seconds #239

elahrvivaz opened this issue Feb 9, 2023 · 2 comments
Labels

Comments

@elahrvivaz
Copy link

Some valid cron syntax, such as 9,19,29,39,49,59 * * * * is now being interpreted as running every 9 seconds after the changes in #235. To recreate, try:

create or replace procedure test_cron(sleep_time integer)
language plpgsql
as $$
begin
	perform pg_sleep(sleep_time);
end;
$$;

select cron.schedule('test_a', '9,19,29,39,49,59 * * * *', 'call test_cron(1);');

The job should run on every 9th minute, but instead it runs every 9 seconds.

@marcocitus marcocitus added the bug label Feb 9, 2023
@marcocitus
Copy link
Member

marcocitus commented Feb 9, 2023

Thanks, shot myself in the foot with sscanf. Did a quick patch for now.

Fixed by 37b5687 (tagged as v1.5.1)

@elahrvivaz
Copy link
Author

Thanks so much for the extremely quick turn-around!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants