Settingup Cron Job for Online Auctions

Scheduling cron job is normally something you’d do through your hosting administration, but for some people the interface can be confusing or a pain to access. In order for your auction site to work properly with regards to auctions ending and winners receiving emails, you’ll need to setup a Cron Job via your hosting control panel. This step is in the Install Guide but below is a bit more information on it.

As you receive visitors on your site, WordPress checks your database to see if anything is scheduled to run. If you have a wp_cron() function scheduled ever 12 hours, then the very first visitor 12+ hours from the last scheduled run of that function will trigger the function to run in the background. The Cronjob (or Cron Job) sends a request to run cron through HTTP request that doesn’t halt page loading for the visitor. You will need to setup a Cron Job that runs every 15 minutes. Below is the link that you want to use in your cron job. You will need to change to your domain and use your own path to the file.

php -q /public_html/

When you’re in your hosting control panel, find where your cron jobs are setup. Then create one and have it run every 15 minutes. You can have it run every 5 minutes if you want. It’s up to you. Then make sure the URL to the file cron_job.php is proper. You might need to setup a permission to the file so that it gets executed. Your hosting company can help you set this up. It’s very straight forward.

Leave a Reply

Your email address will not be published.