Crontab generates many empty files

Our crontab syntax already includes an option which prevents files form being generated each time the crontab runs.

However, some hosting providers may require an different crontab command.

If your default crontab command looks something like:

wget -q "https://demo.phpmelody.com/cron.php?cron-key=68afdf2c980faf60924dc188b9ab583a"

You will have to use the -O option as illustrated below:

wget -O /dev/null "https://demo.phpmelody.com/cron.php?cron-key=68afdf2c980faf60924dc188b9ab583a"

How to Create a Cron Job

The “Automated Jobs” feature from PHP Melody requires a cron job to run a PHP script on a regular basis.
Most of the times this can be easily be accomplished with the help of crontab (linux).

To setup your new cron job, you need to know the URL/command which cron will run. Retrieve this information log into your PHP Melody’s back-end and browse to the Automated Jobs > Setup page.

Once you retrieved your URL/command (should include a secret key), proceed with setting up your cron job as follows.

Method 1: Setup cron via cPanel, Plesk or your webhost panel

If you’re running PHP Melody on a shared hosting account or VPS, your webhost has already provided you with some sort of management area such as cPanel or Plesk.

Since adding a new cron job is already very well documented for both cPanel and Plesk we recommend using their instructions:

We also have a quick video on the entire cPanel procedure:

Method 2: Creating a new cron job using the command line (linux)

If you own the server or have access to the command line, edit your crontab by running:

# crontab -e

In a new line, add your cron job by pasting in the following line:

*/5 * * * * wget -q "https://www.PHPMELODY-URL.com/cron.php?cron-key=SECRET_KEY"

This example uses a dummy URL. To get your URL (with the secret key), visit your PHP Melody back-end and browse to the Automated Jobs > Setup page.