error in CronJobs [ /bin/sh: -c: line 0: syntax error near unexpected token `|' ]

Banisaeed

Verified User
Joined
Sep 23, 2015
Messages
34
hello

how to fix this error in cronjobs:

cronjob:
| php -q /home/admin/domains/domain.com/crons/pipe.php

Error in received email:
Code:
/bin/sh: -c: line 0: syntax error near unexpected token `|'
/bin/sh: -c: line 0: `| php -q /home/admin/domains/domain.com/crons/pipe.php'


thanks.
 
Last edited:
check first line of file and check your cron command, there are two separate signs -`-and -'- between dashes
 
I guess it’s an email pipe, you should add it with | to email forwarders, not cronjobs.
 
thanks smtalk
how to setup email piping via forwarders in directadmin ?

whmcs message:
Important Notes
Note: The pipe.php file requires 755 permissions to function properly.
If using DirectAdmin, you must enter the command enclosed in quotes "" for it to be accepted.
 
Back
Top