b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Installation / Upgrade
  3. Advanced Setup
  4. Setting up the Scheduler
  5. cPanel Cron Job Setup

cPanel Cron Job Setup

This solution isn’t as good as setting up a Linux cron job by far, but we mentioned it since cPanel is very widespread and somewhat easier to set up. So if your host uses cPanel as a web configuration interface, you can go to the "cron jobs" section and create a cron job there.

You are going to set up a command that will be run every minute, every hour, every day, every month… or less if you choose too.

wget Method

The "magic" command to type in is: wget -q -O cron_exec.html http://www.yoursite.com/cron/cron_exec.php

Note: change www.yoursite.com to the Base URL ($baseurl) of your b2evolution installation.

wget will simulate a browser hitting the cron_exec.php page each time it is called (once a minute).

wget will also save the result (the HTML you would normally see in your browser) into a file. By default it creates a new file every time. I don’t know where on the server this will happen, but that’s not something you want to happen. This is why we have included the option "-O cron_exec.html". I will make sure the output always goes to the same file named cron_exec.html.

We have included the option "-q" in the command above. It means "quiet"; in other words: "don’t talk to me, don’t generate an email to tell me what you did".

PHP CLI Method

If allowed by your web host, this is a better command line: php /path/to/your/blog/cron/cron_exec.php > /dev/null

It will tell cron to run /cron/cron_exec.php as a PHP by using the command php (the CLI Command Line Interface version of PHP). If the shortcut does not work for your host, you can use /usr/bin/php or /usr/local/bin/php.

The > /dev/null part tells the cron to dump all non-error messages to /dev/null which is like a ‘blackhole’. You will never see these non-error messages again.

Other info

In cPanel, you can also enter an email address where the cron output will send you an email about what happened each time it runs. This is a perfect way to get a new email every minute of the day but it can get boring quite fast. So if you can, leave the email address empty except maybe for debugging.

Created by fatimahnasra • Last edit by winskie on 2019-08-19 02:55 • •

1 comment

Comment from: hazel

If your hosting limits cron job use. You may try webcron service Easycron.com.

2014-04-14 @ 17:28

On this page

  • wget Method
  • PHP CLI Method
  • Other info

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
    • New Installation
    • Upgrade
    • Configuration files
    • Advanced Setup
      • Test features
      • Intranet installation
      • Intranet setup
      • After Installation / Upgrade
      • Setting up the Scheduler
        • Linux Cron Job Setup
        • cPanel Cron Job Setup
        • Windows Scheduled Task Setup
      • Multi-Domain Setup
      • Multiple instances
      • File Permissions
      • How to change the location of admin.php
      • Google API key
      • GitHub API key
    • Migrating from Another System
    • Moving your b2evolution Site
    • FAQ & Troubleshooting (Installation / Upgrade)
    • Assumed User Skills
  • Front-office Reference
  • Back-office Reference
  • Developer Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
powered by b2evolution

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque