Using Cron Jobs

Using cPanel Cron Jobs

Cron jobs simply are bash commands put on a schedule. So when looking to create a new cron job a good way to test it is to run the command from SSH, this will show you quite quickly if your SSH command is good.


Sometimes when setting up Cron Jobs you find Cron is placing a log-file in your home directory each time the cron runs. This can quickly add up to 1000's of files. To disable the log file creation add -O /dev/null to uour cron command. For example: 

wget -O /dev/null http://domain.com/mail/email.php

By default cPanel will send e-mails when a cron job runs. this can quite quickly spam your inbox. To disable e-amil notification from cron add 
> /dev/null 2>&1 to the end of your command. For example:

wget -O /dev/null http://domain.com/mail/email.php > /dev/null 2>&1


  • 0 用戶發現這個有用
這篇文章有幫助嗎?

相關文章

Enabling Mysql Remote Access

Opening up Mysql to remote connections is a security risk and so we grant remote access only by...

PHP Selector Supported Versions

We currently offer PHP 5.6, 5.7, 7.0, and 7.1 VIA the PHP Selector in cpanel. All earlier...

Addon Domain | Sorry, the domain is already pointed to an IP address

If when trying to add a addon domain via cPanel you receive an error similar to this:Sorry, the...

Getting Rid Of Sub-domain From Addon Domain

When creating an addon domain in cPanel a few different entry points are created to that addon...

cPanel Access Ports Are Blocked By My ISP

It does happen that a ISP (Internet Service Provider) or the place at which you work may have...