problem with "mailwizz" cronjob

pouyatavafi

New member
Joined
Jul 29, 2015
Messages
1
Hi,
we run a script using cronjob. When creating cronjobs like :
PHP:
# Campaign sender, runs each minute:
* * * * * php -q {FULL_PATH_TO_APPS_FOLDER}/apps/console/console.php send-campaigns > /dev/null 2>&1

# Transactional emails sender, runs once at 2 minutes: (since 1.3.4.5)
*/2 * * * * php -q {FULL_PATH_TO_APPS_FOLDER}/apps/console/console.php send-transactional-emails > /dev/null 2>&1

# Bounce handler, runs once at 10 minutes:
*/10 * * * * php -q {FULL_PATH_TO_APPS_FOLDER}/apps/console/console.php bounce-handler > /dev/null 2>&1

# Feedback loop handler, runs once at 20 minutes:
*/20 * * * * php -q {FULL_PATH_TO_APPS_FOLDER}/apps/console/console.php feedback-loop-handler > /dev/null 2>&1

# Process delivery and bounce logs, runs once at 3 minutes:
*/3 * * * * php -q {FULL_PATH_TO_APPS_FOLDER}/apps/console/console.php process-delivery-and-bounce-log > /dev/null 2>&1

# Cleanup command to run daily:
0 0 * * * php -q {FULL_PATH_TO_APPS_FOLDER}/apps/console/console.php daily > /dev/null 2>&1
got this error :

PHP:
crontab returned non zero value: "./data/users/po0yat/crontab.conf.tmp":1: bad command errors in crontab file, can't install.

What can i do ?
 
When cron runs a job there is little to no $PATH setup, so instead of using php, you want the full path to php which is the command you are running, so it should be something like:
* * * * * /usr/local/bin/php -q {FULL_PATH_TO_APPS_FOLDER}/apps/console/console.php send-campaigns > /dev/null 2>&1

So that it doesn't have to rely on $PATH being set to find the command to execute. I am not sure that /usr/local/bin/php is the valid file for you system so you will have to adjust for your settings.
 
Back
Top