devtestprod[site_URL] is your environment’s URL (as listed on the Cloud > Domains page). If you are using Drupal multisite, your cron jobs are specific to each website in the multisite installation. Use the URL of the website in the installation you want to target.You can execute alternative Drush cron commands using the following syntax:
drush --uri=http://[site-uri] -d -v cron &>> /shared/logs/drush-cron.logYou can execute alternative Drush cron commands using the following syntax:
drush --uri=http://[site-uri] -d -v cron &>> /var/log/sites/${AH_SITE_NAME}/logs/$(hostname -s)/drush-cron.logIn the preceding example, &>> /var/log/sites/${AH_SITE_NAME}/logs/$(hostname -s)/drush-cron.log logs the cron output to a drush-cron.log file in the infrastructure’s logs directory.
Cron jobs must always include a logging statement.
For infrastructure where you want a single hook, you can also run a specific cron hook directly. The command structure will vary based on your Drupal version and module.
drush -v ev "mymodule_cron();" &>> /shared/logs/drush-cron.logdrush -v ev "mymodule_cron();" &>> /var/log/sites/${AH_SITE_NAME}/logs/$(hostname -s)/drush-cron.logThe previous commands will log output to the standard log files, ensuring log rotation and maintenance continues.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
[env]devtestprod[site_URL] is your environment’s URL (as listed on the Cloud > Domains page). If you are using Drupal multisite, your cron jobs are specific to each website in the multisite installation. Use the URL of the website in the installation you want to target.You can execute alternative Drush cron commands using the following syntax:
drush --uri=http://[site-uri] -d -v cron &>> /shared/logs/drush-cron.logYou can execute alternative Drush cron commands using the following syntax:
drush --uri=http://[site-uri] -d -v cron &>> /var/log/sites/${AH_SITE_NAME}/logs/$(hostname -s)/drush-cron.logIn the preceding example, &>> /var/log/sites/${AH_SITE_NAME}/logs/$(hostname -s)/drush-cron.log logs the cron output to a drush-cron.log file in the infrastructure’s logs directory.
Cron jobs must always include a logging statement.
For infrastructure where you want a single hook, you can also run a specific cron hook directly. The command structure will vary based on your Drupal version and module.
drush -v ev "mymodule_cron();" &>> /shared/logs/drush-cron.logdrush -v ev "mymodule_cron();" &>> /var/log/sites/${AH_SITE_NAME}/logs/$(hostname -s)/drush-cron.logThe previous commands will log output to the standard log files, ensuring log rotation and maintenance continues.
If this content did not answer your questions, try searching or contacting our support team for further assistance.