Author Topic: Cron Jobs Do Not Run That Use Dev Null  (Read 5135 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Cron Jobs Do Not Run That Use Dev Null
« on: March 04, 2019, 03:12:04 PM »
In the panel if a cron job is for example:

/usr/local/bin/php -q /home/xxxx/public_html/apps/console/console.php send-campaigns >/dev/null 2>&1

This part: >/dev/null 2>&1 keeps getting truncated, it removes the > and then the cronjob does not run.

It only works when I remove the /dev/null 2>&1

So the cronjob in the panel looks like this: /usr/local/bin/php -q /home/xxxxx/public_html/apps/console/console.php send-campaigns /dev/null 2&1

The above will not work! I tried editing the cron job manually in var/spool/cron and it shows correct there, but in CWP it still shows incorrect and the cron job does not run.

Offline
***
Re: Cron Jobs Do Not Run That Use Dev Null
« Reply #1 on: March 04, 2019, 08:31:44 PM »
I would not recommend to redirect both the standard output and error output.
This is due to cronjob could to warn you about problems, and without them could turn your task to debug applications much more difficult.

You still didn t said where you put that commands.
If was in panel, try to cat the content directly from /etc/crontab here to us, or by show us the result of the command "crontab -l user" here.
The objective is to check if the panel is passing correctly the commands to corntab.

Regards,
Netino