• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

Cron Job Email Address

S

Superman859

Guest
I have a few cron jobs that run very often, and I am not interested in receiving emails regarding them every time they run (I just realized I had 500,000 emails taking up 2gb space because of this at one address). However, I noticed that under preferences, email address for cron messages is required.

I read that if I am manually configuration the crontab file, I should be able to run a command as

env php -q /var/www/vhosts/site.com/subdomains/marketing/httpdocs/admin/cron/cron.php >> /var/www/vhosts/site.com/subdomains/marketing/httpdocs/admin/cron/cron.log

and this should simply pipe the output to a log file. This seems like it would be a better solution (an even better solution would not provide any output unless it failed. The job runs every minute, so that's either a lot of emails or a large log file. I'm only interested if it fails).

I tried setting up the cron job using plesk control panel and in the command field I simply used the line above. However, it doesn't appear to be working correctly. The log file remains empty, and the emails have stopped. I tried running

/etc/init.d/crond restart

as well, without any success.

Does anyone know a good solution for this situation, or at least what I may be doing wrong with trying to get it to go to a log file rather than email? I'm not sure how setting up the command as above in the control panel works or how the email address under preferences works (other than it is marked as required field). Is there a way to set this up appropriately using just the control panel, or will I need to manually edit the crontab file and not set it up in the control panel at all? I use the control panel for pretty much everything, so I'd like to stick with it if possible.

EDIT: The task is currently scheduled under the domain in the control panel. I did not configure it from the main 'server' scheduled tasks button.
 
Back
Top