pg_cron icon indicating copy to clipboard operation
pg_cron copied to clipboard

ERROR: invalid schedule: 0 1/4 * * *

Open disarticulate opened this issue 7 years ago • 2 comments

Based on the recommended

https://crontab.guru/#0_1/4___*

SELECT cron.schedule('0 1/4 * * *', $$
    select replicate_whole_database('192.168.1.220','mydb');
$$);

I'm guessing steps are not implemented? I didn't see it in the readme.

disarticulate avatar May 08 '18 13:05 disarticulate

Thanks for reporting. The red text on crontab.guru that appears when you enter that schedule mentions "Non standard! May not work with every cron.". I guess pg_cron is one of those crons :).

You can work around it by using 0 1-23/4 * * *

marcocitus avatar May 09 '18 10:05 marcocitus

I was just following orders:

An easy way to create a cron schedule is: crontab.guru.

disarticulate avatar May 09 '18 12:05 disarticulate