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 above command will generate the following which should be added to the wrangler.toml file in the cron-jobs repository under the specified environment, e.g. [env.production]
{ binding = "<binding_name>", id = "<binding_id>" }
After this step, we should be able to see the binding with cron-jobs-CronJobsTimestamp in the Cloudflare dashboard.
Create via Cloudflare dashboard
Navigate to https://dash.cloudflare.com/.
From the left pane/ sidebar, select Workers & Pages, and then choose KV.
Click on the Create a namespace button and then type the name of the namespace CronJobsTimestamp and then click Add.
Once added, from the list of namespaces, check for the newly created one and click View.
Select and copy both the Namespace name and id, and follow the same format mentioned above to add the new binding to the wrangler.toml file in the cron-jobs repository under the specified environment, e.g. [env.production].
Step 3: Create Key-Value (KV) pair
Create KV that contains the timestamp of the last executed batch process that updated the discord nicknames
This step can be performed either via the command line or the Cloudflare dashboard.
Create via wrangler command
Run the following command. Make sure to replace <environment> with the environment the namespace is being created for. E.g. staging or production.
npx wrangler kv:key put --binding=CronJobsTimestamp "DISCORD_NICKNAME_CHANGED" 0 --env=<environment>
You should get the following result (of course, with the id of the namespace you created above).
Create via Cloudflare dashboard
Navigate to the namespace view dashboard by following the steps mentioned in Step 1 Create Namespace
Type the KV name DISCORD_NICKNAME_CHANGED and the value 0, and click on Add entry
You should be able to view the DISCORD_NICKNAME_CHANGED KV and its value in the list as shown in the image below
The text was updated successfully, but these errors were encountered:
Create the following KV Namespace and binding in Cloudflare to store the last discord nickname updated timestamp.
❗️Important
Step 1: Enable Permissions
Step 2: Create Namespace
CronJobsTimestamp
which will contain the binding used to refer the KV namespaceCreate via
wrangler
command<environment>
with the environment the namespace is being created for. E.g.staging
orproduction
.wrangler.toml
file in thecron-jobs
repository under the specified environment, e.g.[env.production]
cron-jobs-CronJobsTimestamp
in the Cloudflare dashboard.Create via Cloudflare dashboard
Navigate to
https://dash.cloudflare.com/
.From the left pane/ sidebar, select
Workers & Pages
, and then chooseKV
.Click on the
Create a namespace
button and then type the name of the namespaceCronJobsTimestamp
and then clickAdd
.Once added, from the list of namespaces, check for the newly created one and click
View
.Select and copy both the Namespace name and id, and follow the same format mentioned above to add the new binding to the
wrangler.toml
file in thecron-jobs
repository under the specified environment, e.g.[env.production]
.Step 3: Create Key-Value (KV) pair
Create via
wrangler
command<environment>
with the environment the namespace is being created for. E.g.staging
orproduction
.Create via Cloudflare dashboard
DISCORD_NICKNAME_CHANGED
and the value0
, and click onAdd entry
DISCORD_NICKNAME_CHANGED
KV and its value in the list as shown in the image belowThe text was updated successfully, but these errors were encountered: