Cron or demon ...
They are scheduled tasks that are in constant execution depending on their configuration.
First check if you already have cron system installed and running
/sbin/service crond status
If you do not have the service install it with the following command.
rpm -q vixie-cron
For the configuration the main cron configuration file, / etc / crontab , contains the following lines:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
The first four lines are variables that are used to configure the environment in which cron tasks are executed. The SHELL system variable that tells the shell environment to use (in this example, the bash shell), while the PATH variable defines the path used to execute commands . The output of cron tasks will be sent by email to the user name defined with the variable MAILTO . If the variable MAILTO is defined as an empty string (MAILTO=""), the email is not sent. The variable HOME can be used to set the main directory to use when executing commands or scripts.
Each line in the / etc / crontab file represents a task and has the following format:
minute hour day month dayofweek command
Here you can configure a .sh file and within it you can execute a series of commands including the call to the PHP script and set dates and execution time.
To start the CRON / sbin / service crunch start and to stop them / sbin / service crond stop