Scheduler (cron)
ISPmanager allows automatic execution of scheduled jobs using Cron. Cron is a daemon that executes commands at specified intervals. Cron jobs are scheduled tasks (commands) that are executed by such daemon at predefined times. A cron job is a series of simple tasks run from a script.
To open the scheduler, log in with a user account and enter Main → Scheduler.
Viewing the scheduler task list
- Command — the path to the program to be executed automatically at a given interval;
- Schedule — the interval of running the task;
- Status;
- Description — the task description.
Add a cron job
To create a new scheduler task, press Create and fill in the form fields: - Command — enter the path to the script you want to run.
- Description — provide any information related to this cron job.
- Schedule — select the time frame of the cron job.
- Basic mode — allows to chose a variant. Expert mode — allows to enter a certain value. Run — select when you want to execute the cron job.
Details
- every hour — the cron job will be executed on the selected hours;
- daily — the cron job will be executed on the selected days at 12:00 p.m;
- weekly — the cron job will be executed every Sunday;
- monthly — the cron job will be executed on the selected months;
- yearly — the cron job will be executed on January, 1;
- while reboot.
- expert mode — this mode allows you to select more accurate values.
Details
- Minutes;
- Hours;
- Days of the month;
- Months;
- Days of the week.
- Do not email report — check the box if you do not want to receive an email notifying you of a specific cron job. You can provide your e-mail address in the Global_cron_job_settings.
Run cron job
To check any of the cron jobs, select the one you need from the list and click Run. In the window that will appear you will see the cron job results. - Command — the command (sequence of commands), which will be executed in the server operating system shell;
- Directory — specify the directory in which the command will be executed.
Global settings
With this function, you may customize the global cron jobs. Select the required cron job, click the Settings icon and fill out the form: - E-mail address — enter the email address of the user executing the cron job to send notifications about the cron jobs that failed;
- Path — enter the path that will be used to search for the programs to be executed. The default value for a newly created users is /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin.
How to add execution of the PHP script.For example, the path to the script /var/www/user/data/www/domain.com/script.php - Call the script by passing it to the interpreter:
/usr/bin/php /var/www/user/data/www/domain.com/script.php
To find out the path to php, run the command: - Call the script through wget:
/usr/bin/wget domain.com/script.php
To find out the path to wget, run the command: