Bobcares

Add Cron Job in VestaCP – How to perform

by | Mar 31, 2021

Wondering how to add Cron Job in VestaCP? We can help you.

Cron is a time-based job scheduler that schedules jobs to run periodically at fixed times, days, or intervals.

Here at Bobcares, we handle requests from our customers to add Cron Job in VestaCP as a part of our Server Management Services. Today let’s see how our Support Engineers add crons for our customers.

Steps to add cron jobs in VestaCP

Following are the steps that our Support Engineers use to configure cron jobs in VestaCP:

1. Firstly, connect to VestaCP account.

2. Then click the CRON tab in VestaCP.

3. From here we can see the list of cron jobs. To create a new one, click the ADD CRON JOB button (green button “+”).

3. After that, we must enter the Command and the interval at which we want the cron job to execute.

Generally, VestaCP has some predefined values. So, we can choose the value we want and click the Generate button.

Tabs available in Vestacp

a. Minutes Tab: From the Minutes tab, we may select any option from the dropdown menu, then click generate. Every minute represents an asterisk (*) in the “Minutes” field on the left. Every 15 minutes would be reflected as */15, and so on.

b. Hourly Tab: The Hourly tab allows the cron job to be scheduled on the 0th, 15th, 30th or 45th minute of every 1, 2, 6 or 12 hours.

c. Daily Tab: The Daily tab allows the cron job to be scheduled every single, every odd or even or every 3, 5, 10 or 15 days. Beyond this, the cron job can be scheduled down to the hour and minute.

d. Weekly Tab: The Weekly tab allows scheduling for weekdays only, weekends only, every day or specific days of the week. Then the hour and minute can be specified.

e. Monthly Tab: The Monthly tab allows scheduling for every single, every odd or even, every 3 or 6 or a specific month. From there, the date, hour and minute can be selected.

4. After selecting the tab we can click the Add button. We will see a confirmation message “Cron job has been created successfully”.

5. We can also EDIT or DELETE cron jobs. Using the buttons available on the right side.

For checking  the cron jobs, we can use the following command:

[root@webcp ~]# crontab -u bob -l
MAILTO=bob@bobcares.com
CONTENT_TYPE=”text/plain; charset=utf-8″
* * * * * php /home/bob/cron.php
[root@webcp ~]#

And to check the cron job log for a specific user, use:

cat /var/log/cron | grep bob

[root@webcp ~]# cat /var/log/cron | grep bob
Mar 30 08:06:01 webcp crond[188]: (bob) RELOAD (/var/spool/cron/bob)
Mar 30 08:06:01 webcp CROND[16439]: (bob) CMD (/home/bob/cron.php)
Mar 30 08:07:01 webcp CROND[16475]: (bob) CMD (/home/bob/cron.php)
Mar 30 08:07:11 webcp crontab[16484]: (root) LIST (bob)
Mar 30 08:08:01 webcp CROND[16488]: (bob) CMD (/home/bob/cron.php)
Mar 30 08:09:01 webcp CROND[16497]: (bob) CMD (/home/bob/cron.php)
Mar 30 08:10:01 webcp CROND[16516]: (bob) CMD (/home/bob/cron.php)
Mar 30 08:11:01 webcp CROND[16712]: (bob) CMD (/home/bob/cron.php)
Mar 30 08:12:01 webcp CROND[16725]: (bob) CMD (/home/bob/cron.php)
Mar 30 08:12:01 webcp crontab[16731]: (root) LIST (bob)
Mar 30 08:13:01 webcp CROND[16737]: (bob) CMD (/home/bob/cron.php)
Mar 30 08:14:01 webcp CROND[16748]: (bob) CMD (/home/bob/cron.php)
Mar 30 08:15:01 webcp CROND[16761]: (bob) CMD (/home/bob/cron.php)
Mar 30 08:16:01 webcp CROND[17277]: (bob) CMD (/home/bob/cron.php)
Mar 30 08:17:01 webcp CROND[17287]: (bob) CMD (/home/bob/cron.php)
Mar 30 08:18:01 webcp CROND[17302]: (bob) CMD (/home/bob/cron.php)
[root@webcp ~]#

[Need assistance? We are available 24*7]

Conclusion

In short, we saw the steps that our Support Engineers follow to add cron jobs in VestaCP.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF