You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pgcron extension for PostgreSQL is used to execute periodic tasks. You can schedule SQL tasks, such as queries and data imports, using jobs that run at the intervals you set. On a daily, weekly or monthly basis, for example.
17
+
The pg_cron extension for PostgreSQL is used to execute periodic tasks. You can schedule SQL tasks, such as queries and data imports, using jobs that run at the intervals you set. On a daily, weekly or monthly basis, for example.
18
18
19
-
The `pgcron` extension is available with Scaleway Managed Databases for PostgreSQL. The extension is natively loaded in the `shared_preload_libraries` of the Database Instances by default.
19
+
The `pg_cron` extension is available with Scaleway Managed Databases for PostgreSQL. The extension is natively loaded in the `shared_preload_libraries` of the Database Instances by default.
20
20
21
21
<Macroid="requirements" />
22
22
23
23
- A Scaleway account logged into the [console](https://console.scaleway.com)
24
24
-[Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
25
25
- A [Database Instance](/managed-databases-for-postgresql-and-mysql/how-to/create-a-database/) running a PostgreSQL engine
26
26
27
-
## Installing pgcron
27
+
## Installing pg_cron
28
+
29
+
<Messagetype="important">
30
+
The `pg_cron` extension can only be installed in the `rdb` database, which is created by default upon Database Instance creation. To run jobs in another database, you can use the [schedule_in_database](#scheduling-jobs-in-other-databases) function.
31
+
</Message>
28
32
29
33
Run the following command to install the extension:
30
34
31
35
```sql
32
-
rdb=> CREATE EXTENSION pgcron;
36
+
rdb=> CREATE EXTENSION pg_cron;
33
37
CREATE EXTENSION
34
38
```
35
39
36
-
## Configuring pgcron
40
+
## Configuring pg_cron
37
41
38
-
To fully use the extension, you must grant read/write rights to the user who will be running the `pgcron` functions to manage jobs on the database.
42
+
To fully use the extension, you must grant read/write rights to the user who will be running the `pg_cron` functions to manage jobs on the database.
39
43
40
44
<Messagetype="note">
41
45
Refer to the [How to add users to a PostgreSQL or MySQL Database Instance](/managed-databases-for-postgresql-and-mysql/how-to/add-users) documentation for more information.
0 commit comments