How to execute PHP cron job on the new Da-manager control panel(Cpanel)

CharlesTechy
3 min readJan 5, 2022

What is Cron Job?

According to Hivelocity

A cron job is a Linux command used for scheduling tasks to be executed sometime in the future. This is normally used to schedule a job that is executed periodically — for example, to send out a notice every morning. Some scripts, such as Drupal and WHMCS may require you to set up cron jobs to perform certain functions.

Hmm Da-manager?

Oh yeah Da-manager!

Da-manager is Nigeria’s Best Web Hosting Company offers fast, secure & reliable web hosting, domains, with UK 24/7 Support, Free SSL, Emails and more!

With quick response and feedbacks Da-manager has proven to be the best hosting company not only in Nigeria.. you can register with them today

How to Schedule a task?

To run or execute your task(script) you will need to login to your da-manager control panel(Cpanel) either with their oneClick user login from your user dashboard or accessing the following address which leads straight to the Da-manager control panel as seen on the image below

https://srv5.myukserver.com:2083

Kindly fill in your Cpanel (control panel) details correctly and you can select or choose your preferred language or allow the system to decide and click on the login button.

Entered the right and correct details? you should see a screen like the one below now… can either be in light or dark mode depending on your preference

Kindly scroll down and click on Crontab under Control Web Panel(CWP) on the image below and you will be redirected to a page to configure your cron settings.

Click on + Add new cron job and enter your task configurations.

At Da-manager you can specify your PHP location followed by your script location; for example executing a php script that will welcome every new user.

you should consider the following parameters:

  1. Command:

This is a box where you input your script location

e.g System Default PHP

php -q /home/user_name/public_html/welcome_new_users.php

php -q /home/user_name/htdocs/welcome_new_users.php

Specifying your PHP version

/usr/local/bin/php -q /home/user_name/public_html/welcome_new_users.php

2. Description:

This act like a comment; letting you know what the cronjob is meant to do

3. TIME(When to run):

Time here is all about when your task should run automatically

for instance we want our tasks to run every 5minutes or 10mins

we would do this in advance settings
*/5****

Mins: */5

Hours: *

Days: *

Months: *

Weekdays: *

Need better understanding about CronTabs?

you can read more about cron tabs timing and different examples by following the link below

Check this Crontabs Examples

Check the image below to have better understanding

Click on the Save cron button

Congratulation mate you just succeeded in creating your first cron job

--

--

CharlesTechy

Hi am CharlesTechy a Full Stack developer | Content Creator | Edu Coach