DigitalOcean Function to ping a Drupal cron URL via scheduled triggers.
The easiest way to deploy this is to install and configure
doctl. Then,
check out this repository. Next, create a .env
file in the root of the
repository with the contents:
CRON_URL=YOUR_URLWhere 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
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.
Once you have a namespace, connect to it:
doctl serverless connectNow doctl knows where to deploy the function. To do so, run:
doctl serverless deploy /path/to/repositoryWhere /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.