Documentation

Find documentation for our Joomla extensions on this page.

Setup server side cronjob for JoomVideos

Cronjob/Schedule is required for JoomVideos processing and CDN feature to be run automatically and also good for your server performance.

It can be set up to run as script from the JoomVideos Component Settings area -> tab Processing -> enable Processing , and disable auto run mode.

Note: If you don't want to run it as script-side, enable auto run mode and choose type direct instead of CLI.

The instruction below is for hosting with cPanel. The others, it is pretty the same.

To setup cronjob for cPanel, just follow 2 simple steps

Step 1: Accessing cPanel

Setting up cronjobs in Cpanel is really easy. All you need to do is to login to your cPanel account and click on the Cronjobs icon as shown in the diagram below.

cronjob cpanel1

Step 2: Creating the cronjob

Upon clicking on the cronjob icon, you will be presented with the following screen. You will need to enter the following

cronjob cpanel2

The settings are broken down into the following:

  • Minute - Enter the interval for minute. The example above uses "*/5" which means the script is executed every 5 minutes
  • Hour - Enter the interval for minute. The example above uses "*" which means the script is executed every hour
  • Day - Enter the interval for minute. The example above uses "*" which means the script is executed every day
  • Month - Enter the interval for minute. The example above uses "*" which means the script is executed every month
  • Weekday - Enter the interval for minute. The example above uses "*" which means the script is executed every week
  • Command - In the example above, we are running the following command
    /bin/wget -O /dev/null "http://yourjoomlasite.com/index.php?option=com_joomvideos&task=cron.convert&secretkey=xxxx"
    You will need to get the correct path to "wget" and replace the domain name above with your site's domain. Not every hosting has it in /bin/wget
    In the case above command doesn't work, you can use an alternative command:
    lynx -dump 'http://yourjoomlasite.com/index.php?option=com_joomvideos&task=cron.convert&secretkey=xxxx
    Don't forget to replace the domain name by your one.

Step 3: Cron Job Commands

  • Video Processing (Video format convertion, duration extraction, frames generation ...):
    • Using Wget: 
      /bin/wget -O /dev/null "http://yourjoomlasite.com/index.php?option=com_joomvideos&task=cron.convert&secretkey=xxxx"
    • Using CLI: 
      crontab -e */5 * * * * /usr/bin/php "/path/to/joomla/cli/joomvideos_process.php process"
  • CDN (moving files to Amazon S3)
    • Using Wget: not yet implemented.
    • Using CLI: 
      crontab -e */5 * * * * /usr/bin/php "/path/to/joomla/cli/joomvideos_process.php cdn"

Note: you can find secret key in component Settings area -> tab Processing, and you can change it to any value you want.

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.

Ok