poniedziałek, 25 czerwca 2018

WebEngine - Cron Jobs

I believe that you have Apache with Linux. Ofc you can do it with MS Windows as well and it's called Windows Task Scheduler.

We just need to make script which will be executed periodically by our Linux.

Let's start!

Add following line by using command: crontab -e
*/1 * * * * /usr/bin/php -f /var/www/html/includes/cron/cron.php

Add this line with your real path of cron.php and if you don't know where is php use try command:
whereis php

That line in crontab will let execute cron php every minute.

If you want to configure it more specify then google it how it works. It's not super hard!

2 komentarze:

  1. Crontab files are simple text files that have a particular format. Each line of a crontab file follows a particular format as a series of fields, separated by spaces and/or tabs. Each field can have a single value or a series of values. A single cron job should take up exactly one line, but this can be a long line (more than 80 characters).
    for more information click here: how to setup a cron job

    OdpowiedzUsuń