Setting up a cron job with Webmin

John picture John · Apr 29, 2011 · Viewed 24.1k times · Source

I am trying to setup a Cron job using Webmin to run every 5 min. It needs to target a .php file and run the php script in that file. When I enter the path to the file in the "Command" field, it doesn't work. I am just wondering what I am doing wrong, and where do I put the file path that I need the Cron job to run.

Thanks!

Answer

Naresh Kumar Nakka picture Naresh Kumar Nakka · May 31, 2012
  1. System -> Scheduled Cron Jobs
  2. Click Create a new scheduled cron job.
  3. In Command box enter /usr/bin/php -q /var/www/path/to/your_php_script.php
  4. Click "Times and dates selected below .." radio button
  5. Click "Selected.." under Minutes section
  6. Select 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55 (use control key) and click 'Save' button.