Guide Category

134

Cronjob (DLE Automated Scheduler)

In DataLife Engine has an option to run some functions on a schedule. You can automatically generate a backup of the database to optimize database, and create a sitemap for search engines. Is required for this feature to your hosted application launch scheduled (CRON). To start the functions of the cron is cron.php file located in the root of your site. By default, for security reasons the setting to run this file is turned off, so if consider enable this feature, you can do so.
dlestarter
Cronjob (DLE Automated Scheduler) In DataLife Engine has an option to run some functions on a schedule. You can automatically generate a backup of the database to optimize database, and create a sitemap for search engines. Is required for this feature to your hosted application launch scheduled (CRON). To start the functions of the cron is cron.php file located in the root of your site. By default, for security reasons the setting to run this file is turned off, so if consider enable this feature, you can do so.

First, we recommend that for security reasons you should rename the file cron.php to something else but with extension .php

Next, open the file in a text editor and locate the very beginning of the line
    $allow_cron = 0;
Change it to
    $allow_cron = 1;
In this way you allow this file to perform the functions in automatic mode.

Then you can change the number of database backup files to be stored on the server. To do this, find below the line
    $max_count_files = 5;
Where 5 is the number of copies of the database. You can put your own number of files. If you exceed this limit, older backups of the database will be automatically deleted.

Now you need to add this file to run on a scheduled (CRON) the establishment and the frequency you set yourself. For detailed instructions on how to add the file in the CRON function you can get your hosting provider.

DLE offer Options to run Cron functions available in 4 different functions:

  • 1. Creating Database Backup. To start this mode just run cron.php file without any parameters.
  • 2. Creating Sitemap. To start this mode Run the file with parameter cron.php?cronmode=sitemap
    If you use the console running a shell script, use php -f cron.php sitemap

    When you create a sitemap cronjob, this function will also notify and auto submit the sitemap to search engines.
  • 3. Database Optimization. To start this mode, run the file with the parameter cron.php?cronmode=optimize
    If you use the console running a shell script, use php -f cron.php optimize
  • 4. Run Anti-Virus. To start this mode, run the file with the parameter cron.php?cronmode=antivirus
    If you use the console running a shell script, use php -f cron.php antivirus
In order to run "Cron" you must specify the correct parameter and path the to cron file in case you name the "cron" as different name, also the path to the file must be specified correctly, please consult with your host provider and administrator for absolute path.

For step by step how to setup Cronjobs in DLE using cPanel, please visit Step By Step Guide

Related Tutorials

Review/Leave Comment

comments powered by Disqus