Domanda

I added a basic cron.yaml file to a GAE project and updated the project. Its the default version. I didn't get any parsing errors during upload but there is no entry in the cron tasks on the GAE dashboard to indicate the yaml file was understood

Anyone familiar with drupal will understand the structure of the cron url, it appends a unique key to the request to stop your site getting bombed with requests to cron

Could the length of the url be the problem? The admin logs on GAE don't show that a cron job was added

here is my cron.yaml (except for some #comments)

- description: Drupal system cron
  url: /cron.php?cron_key=Rand0-CharactersAndNUmbersInDifferentCases2
  schedule: every 60 mins
È stato utile?

Soluzione

Does your yaml file start with cron:?

cron:
 - description: Drupal system cron
   url: /cron.php?cron_key=Rand0-CharactersAndNUmbersInDifferentCases2
   schedule: every 60 mins

The syntax is correct, so problem must lie in uploading of the file. Do the tasks show in the local admin panel (usually located at http://localhost:8000/cron)? Perhaps try re-uploading the cron file with appcfg.py update_cron

Aside, it's not necessary to protect the task using a unique key - in your app.yaml you can specify login: admin, as shown:

- url: /cron.* script: cron.php login: admin

Scheduled tasks run with admin privileges: https://developers.google.com/appengine/docs/php/config/cron#PHP_app_yaml_Securing_URLs_for_cron

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top