Skip to main content

Documentation

IMPORTANT

This is the outdated SI-documentation which will be adapted soon. A huge part may be obsolete!

Cronjobs

What Are Cronjobs?

Cronjobs are scheduled tasks or commands set on your server to be run automatically at specified times and dates. It is very useful for automating repetitive tasks such as sending email notifications and etc.

Why Do We Need Cronjobs?

Cronjobs can be used to execute a variety of scheduled tasks. You have the flexibility to specify when to run these tasks. Furthermore, systematically executed tasks take a huge load off the web server when the tasks involved are huge, like sending out lots of emails.

Scenario
John posted a comment on a stream item that has 1000 previous comments. Delivering 1000 emails notification as soon as you posted a comment would severely impact the site's performance. In addition, some users may receive duplicate emails or get no email at all due to the sudden negative performance spike on the server. Would you want your users to experience these issues?

What If My Webhosting Provider Doesn't Support Cronjobs?

If your web hosting doesn't support cronjobs, it is time that you ditch them or get them to allow cronjobs. It is one of the most important tools to build and manage sites.

Tasks Performed By EasySocial Cronjobs

  • Sending out emails notification.
  • Remove sent emails from the queue.
  • Processing email digest.
  • Processing uploaded audio/video.
  • Processing upcoming event reminders.
  • Removing expired cache links.
  • Removing old system notifications.
  • Removing unused photo size variation.
  • Unblocking users that have completed the ban duration.
  • Generating emails remainder for inactive user accounts.
  • Processing media for remote storage.
  • Archiving legacy stream items.
  • Processing GDPR download requests.
  • Removing expired GDPR download requests.

Cronjobs Configuration

You can find EasySocial's general cronjobs settings at EasySocial > Settings > General > System > Cronjobs Settings.

EasySocial Cronjobs Settings

Secure Cronjobs Key

In EasySocial, we have introduced a secure cronjobs feature as a method for protecting your cronjobs command. All you need to do is to enter a key in the secure cronjobs key field. Do not forget to turn on the Use Secure Cronjobs URL setting as well. This secure cronjobs key needs to be included together with the cronjobs command.

Cronjobs Execution

There are 2 ways to execute cronjobs on EasySocial, using cronjobs url or file, depending on what your server uses.

  • Cronjobs url(without secure key):
    http://site.com/index.php?option=com_easysocial&cron=true
    http://site.com/index.php?option=com_easysocial&crondata=true (GDPR download processing)

  • Cronjobs url(with secure key):
    http://site.com/index.php?option=com_easysocial&cron=true&phrase=secure_cronjob_key
    http://site.com/index.php?option=com_easysocial&crondata=true&phrase=secure_cronjob_key (GDPR download processing)

  • Cronjobs file path:
    JoomlaFolder/components/com_easysocial/cron.php
    JoomlaFolder/components/com_easysocial/crondata.php (GDPR download processing)

    If you plan to use the cronjobs files, remember to change the $host value to your domain and add the secure cronjobs key to the cronjobs url if applicable.

    EasySocial Cronjobs Settings