I want to automatically run a PHP script every 3 hours or so. The script is pretty heavy. It pulls XML data from another website then encodes it into a JSON file to be imported by feeds. The resulting JSON file is around 250 KB. I'm trying to set it up with the Elysia CRON module but it keeps saying that I have invalid lines.

3 * * * * php https://dev-smwdb.pantheonsite.io/sites/all/gen-job-bank/gen-job-bank.php

What do I need to change? Is this even possible with Elysia? Is there a better solution?

Drupal 7 site built on the Pantheon platform. No backend access to CRON and PHP execution time limited to 120.


  • Cron (and elysia cron) just runs commands. Try your command php https://dev-smwdb.pantheonsite.io/sites/all/gen-job-bank/gen-job-bank.php from your workstation. I'm going to guess that it doesn't work. – Chance G Feb 22 '18 at 21:12
  • That command looks dodgy just at a casual glance - it suggests your webserver is serving back a PHP script as text, which most server configs do not allow, because of the disclosure risk. If you are running the script ON the server, you need the file path (eg. ./var/www/mysite/sites/all/gen-job-bank/gen-job-bank.php), not the URL. – Alfred Armstrong Feb 23 '18 at 11:02
  • edited the line to 3 * * * * php /srv/bindings/a4ed884a36c34af7b9c2e5421db8dbec/code/sites/all/gen-job-bank/gen-job-bank.php still says invalid lines – Webmastercolin Feb 24 '18 at 21:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.