Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Unable to stop cron mails

Discussion in 'E-mail Discussion' started by shahzaibmushtaq, May 27, 2019.

  1. shahzaibmushtaq

    shahzaibmushtaq Registered

    Joined:
    May 27, 2019
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Pakistan
    cPanel Access Level:
    Root Administrator
    Hi,

    We've some crons that runs frequently. The problem is, each time cron runs it throws the cron email. We've a;slso set it with /dev/null but still in-vain.

    Cron:

    `0 1 * * * php /home/domain/public_html/admin/tasks/create_email_notifications.cron.php >/dev/null 2>&1`
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,476
    Likes Received:
    507
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @shahzaibmushtaq

    can you tell me the output of the following:

    Code:
    crontab -l
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. shahzaibmushtaq

    shahzaibmushtaq Registered

    Joined:
    May 27, 2019
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Pakistan
    cPanel Access Level:
    Root Administrator
    Sure, please have a look here:

    <link removed>
     
    #3 shahzaibmushtaq, May 28, 2019
    Last edited by a moderator: May 28, 2019
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,476
    Likes Received:
    507
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Can you do the same for the user?

    Code:
    crontab -l -u $username

    Also, please upload screenshots to the thread rather than link to 3rd party sites, I've removed the link previously added.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. shahzaibmushtaq

    shahzaibmushtaq Registered

    Joined:
    May 27, 2019
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Pakistan
    cPanel Access Level:
    Root Administrator
    Hi, Here it is :


    Code:
    MAILTO=""
    SHELL="/usr/local/cpanel/bin/jailshell"
    0 0 * * * php /home/domain/public_html/admin/tasks/auto_prune.cron.php >/dev/null 2>&1
    SHELL="/usr/local/cpanel/bin/jailshell"
    0 0 * * * php /home/domain/public_html/admin/tasks/create_internal_notifications.cron.php >/dev/null 2>&1
    SHELL="/usr/local/cpanel/bin/jailshell"
    0 * * * * php /home/domain/public_html/admin/tasks/delete_redundant_files.cron.php >/dev/null 2>&1
    SHELL="/usr/local/cpanel/bin/jailshell"
    0 0 * * * php /home/domain/public_html/admin/tasks/downgrade_accounts.cron.php >/dev/null 2>&1
    SHELL="/usr/local/cpanel/bin/jailshell"
    */5 * * * * php /home/domain/public_html/admin/tasks/process_file_queue.cron.php >/dev/null 2>&1
    SHELL="/usr/local/cpanel/bin/jailshell"
    0 1 * * * php /home/domain/public_html/admin/tasks/create_email_notifications.cron.php >/dev/null 2>&1
    SHELL="/usr/local/cpanel/bin/jailshell"
    * * * * * php /home/domain/public_html/plugins/archivemanager/queue/process_archive_queue.cron.php > /dev/null 2>&1
    
    As you may have noticed MAILTO variable in the beginning, i added this manually for each user cron and after which it looks like cron emails are now stopped. Do you think, missing this variable by default in cpanel could be the issue ?
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice