Introduction
-
Cpanel is used to manage Cron Jobs and Background processes of a project.
-
The software utility cron is a time-based job scheduler in Unix-like computer operating systems. People who set up and maintain software environments use cron to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals.
-
A background process is a computer process that runs behind the scenes (i.e., in the background) and without user intervention.Typical tasks for these processes include logging, system monitoring, scheduling, and user notification
git clone https://github.com/codexten/yii-cpanel-app.git cpanel
cd cpanel
cp .env.dist .env
cp hidev-local.yml.dist hidev-local.yml
configure .env and hidev-local.yml files
composer update --prefer-dist --no-progress --profile
./vendor/bin/hidev deploy
./vendor/bin/hidev nginx/deploy
Authentication
First and foremost to Manage Cpanel in Local, Follow the steps:
-
Enter user name as "admin"
-
Enter password as "admin" and sign in
Manage Cron Jobs
-
Access http://cpanel.yii/cron.
-
Click on "create" button(green) on the upper right most corner.
-
Enter the name of the Cron Job.
-
The Cron Jobs vary in Run time. Specify the run time as per requirement.
a)every minute and last run : ***** b)every five minute :*/5**** c)hourly : 0**** d)daily : 10***
-
The next field required to be filled is Run command. This is the instance from the current version of the project followed by the cron job respectively.
Manage Background Process
-
Access http://cpanel.yii/process.
-
Click on "create" button(green) on the upper right most corner.
-
Enter the Name and Run Command where name specified should be the name of the background process and Run command should be the project current instance of version followed by the process.
-
Then create the process.
-
The created process appears in the http://cpanel.yii/process.
-
These processes are provided with options to run,edit and delete.
-
The process works in the project only if we run the background process.
-
We can similarly stop the process run on clicking on the stop.
-
We can edit and delete the process upon requirement using edit and delete options provided.