Skip to content

Commit fa3c780

Browse files
fix(rdb): review hugo
1 parent 224cb89 commit fa3c780

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

pages/managed-databases-for-postgresql-and-mysql/api-cli/using-pgcron.mdx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
meta:
3-
title: Setting up and using the pgcron extension
4-
description: This page explains how to set up and use the pgcron extension.
3+
title: Setting up and using the pg_cron extension
4+
description: This page explains how to set up and use the pg_cron extension.
55
content:
6-
h1: Setting up and using the pgcron extension
7-
paragraph: This page explains how to set up and use the pgcron extension.
8-
tags: managed-database postgresql pgcron pg-extensions
6+
h1: Setting up and using the pg_cron extension
7+
paragraph: This page explains how to set up and use the pg_cron extension.
8+
tags: managed-database postgresql pg_cron pg-extensions
99
dates:
1010
validation: 2025-02-18
1111
posted: 2025-02-18
@@ -14,28 +14,32 @@ categories:
1414
- postgresql-and-mysql
1515
---
1616

17-
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.
1818

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.
2020

2121
<Macro id="requirements" />
2222

2323
- A Scaleway account logged into the [console](https://console.scaleway.com)
2424
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
2525
- A [Database Instance](/managed-databases-for-postgresql-and-mysql/how-to/create-a-database/) running a PostgreSQL engine
2626

27-
## Installing pgcron
27+
## Installing pg_cron
28+
29+
<Message type="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>
2832

2933
Run the following command to install the extension:
3034

3135
```sql
32-
rdb=> CREATE EXTENSION pgcron;
36+
rdb=> CREATE EXTENSION pg_cron;
3337
CREATE EXTENSION
3438
```
3539

36-
## Configuring pgcron
40+
## Configuring pg_cron
3741

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.
3943

4044
<Message type="note">
4145
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.
@@ -168,7 +172,7 @@ SELECT cron.alter_job(job_id:=3,database:='anotherdb');
168172

169173
## Cron specifications
170174

171-
Schedules in `pgcron` use the standard Cron syntax:
175+
Schedules in `pg_cron` use the standard Cron syntax:
172176

173177
```
174178
┌───────────── min (0 - 59)
@@ -188,7 +192,7 @@ Schedules in `pgcron` use the standard Cron syntax:
188192

189193
### How to configure your schedule timezone
190194

191-
The time zone of the `pgcron` extension can be changed in the advanced settings of the Database Instance. By default, the time zone is set to GMT.
195+
The time zone of the `pg_cron` extension can be changed in the advanced settings of the Database Instance. By default, the time zone is set to GMT.
192196

193197
<Message type="note">
194198
The `cron.timezone` setting is only available with PostgreSQL 16.

0 commit comments

Comments
 (0)