Jump to content
  • 0

Scheduled Task (Cron) In Plesk


Question

Posted

Hello,

 

Does anyone know why I would be getting this error? The cron works manually however.

 

PHP Parse error:  syntax error, unexpected '{' in /usr/bin/php on line 2047

 

Thank you,

 

Abel Jeffcoat

4 answers to this question

Recommended Posts

  • 0
Posted

My guess is the file (which is not mentioned in the error you pasted) was not fully uploaded or is corrupt, or you've got some custom code (not shipped with Blesta) that is buggy.

  • 0
Posted
  On 12/30/2013 at 7:45 PM, ajeffcoat said:

Cody,

 

I'm using the syntax directly copied from Blesta in Settings -> Automation. If I click on the Run Cron button, it works perfectly.

 

The issue you're experiencing has nothing to do with the way the cron executes, but rather the code that it executes. Not all cron tasks run all the time, so manually running the cron does not guarantee every task will be executed. In fact, if you've scheduled a task to execute the cron at every 5 minutes, running it manually will generally do nothing.

Check your PHP error logs for the rest of the error. Generally you'll see something like:

 

  Quote

PHP Parse error:  syntax error, unexpected '{' in /usr/bin/php on line 2047 in /path/to/file/file.php

 

The file that's causing the error is the most important piece of the puzzle. Without it, the best advice I could give would be to re-upload all Blesta installation files (backing up your existing files first, of course).

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...