Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ambient-impact/drupal-digitalocean-function-cron
DigitalOcean Function to ping a Drupal cron URL via scheduled triggers.
https://github.com/ambient-impact/drupal-digitalocean-function-cron
digitalocean digitalocean-functions drupal php
Last synced: 22 days ago
JSON representation
DigitalOcean Function to ping a Drupal cron URL via scheduled triggers.
- Host: GitHub
- URL: https://github.com/ambient-impact/drupal-digitalocean-function-cron
- Owner: Ambient-Impact
- License: gpl-2.0
- Created: 2023-05-29T17:00:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-24T15:12:45.000Z (8 months ago)
- Last Synced: 2024-11-07T18:00:17.548Z (2 months ago)
- Topics: digitalocean, digitalocean-functions, drupal, php
- Language: PHP
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
[DigitalOcean Function](https://docs.digitalocean.com/products/functions/) to
ping a Drupal cron URL via [scheduled
triggers](https://docs.digitalocean.com/products/functions/how-to/schedule-functions/).# Configuring and Deploying
The easiest way to deploy this is to [install and configure
`doctl`](https://docs.digitalocean.com/reference/doctl/how-to/install/). Then,
check out this repository. Next, create [a `.env`
file](https://www.dotenv.org/docs/security/env.html) in the root of the
repository with the contents:```env
CRON_URL=YOUR_URL
```Where `YOUR_URL` is the cron URL Drupal offers you on the
`/admin/config/system/cron` page of the site you want to ping the cron of. Note
that it's also possible to place this file elsewhere and use [the `--env`
flag](https://docs.digitalocean.com/reference/doctl/reference/serverless/deploy/#flags)
when running `doctl serverless deploy`.Before you can deploy your function, [you'll need to create a namespace either
via the control panel or via
`doctl`](https://docs.digitalocean.com/products/functions/how-to/create-namespaces/).Once you have a namespace, connect to it:
```bash
doctl serverless connect
```Now `doctl` knows where to deploy the function. To do so, run:
```bash
doctl serverless deploy /path/to/repository
```Where `/path/to/repository` is either the absolute path to the folder
containing this readme or a relative path to the current directory. For more
information, see [the documentation for
`doctl serverless deploy`](https://docs.digitalocean.com/reference/doctl/reference/serverless/deploy/).