Read the Beforeitsnews.com story here. Advertise at Before It's News here.
Profile image
By SiteProNews (Reporter)
Contributor profile | More stories
Story Views
Now:
Last hour:
Last 24 hours:
Total:

How to Run Cron Jobs With cPanel on Vultr

% of readers think this story is Fact. Add your two cents.


Introduction

A cron job is a scheduled task that runs automatically at specified intervals on a server. In cPanel, cron jobs allow users to automate repetitive tasks like running scripts, performing backups, or sending emails without manual intervention. With cPanel’s intuitive interface, setting up a cron job is straightforward: users can specify the exact timing using a simple syntax (minutes, hours, days, etc.) and enter the command or script they want to run. This automation is particularly useful for maintaining regular system tasks, ensuring they are performed consistently and efficiently.

This article will guide you through deploying Vultr’s cPanel Marketplace Application and creating and running cron jobs with cPanel’s advanced Cron Job feature tool.

Deploying Vultr Optimized Cloud Instance

  1. Sign up and log in to the Vultr Customer Portal.
  2. Navigate to the Products page.
  3. From the side menu, select Compute.
  4. Click the Deploy Server button in the center.
  5. Choose Optimized Cloud Compute as the server type.
  6. Choose a server Location.
  7. Choose cPanel as the Marketplace Application.
    marketplace
  8. Choose a suitable plan.
  9. Choose any Additional Features if required.
  10. Click Deploy Now.

Login to the cPanel Dashboard

  1. Open a web browser and visit the following URL. Replace example.com with your cPanel server’s public IP address or domain name

$ https://example.com:2087/

  1. Log in to the WHM service using your cPanel server’s root user account credentials.
  2. Read and agree to the cPanel and WHM terms and conditions. These include the end-user license agreement, privacy policy, pricing terms, and technical support agreement.
  3. Enter your email address in the next screen and configure the nameservers. Then, click Finish. The cPanel server sends notifications to this email address. The nameservers resolve domain names to IP addresses.
  4. Navigate to Account Information, choose List Accounts, and click Create a New Account.
    create-account
  5. Enter the account details including the primary domain name that a customer intends to use to administer their account and click Create.
  6. Visit the following URL. Replace example.com with the cPanel’s primary domain name or server’s public IP address.
  7. Enter the cPanel login credentials.
    cpanel-login
  8. Search File Manager in Tools.
    search-file-manager
  9. Navigate to public_html directory.
  10. Click Upload to upload your cron job file.
    This is a sample code, which can be used to run a simple cron job.

$current_time = date(‘H:i:s’);

$report = “Current time: ” . $current_time . “n”;

file_put_contents(‘/home/your_username/current_time.txt’, $report);

echo “Current time updated.”;

?>

  1. After uploading the file, navigate to cPanel home and search for Cron Jobs in Tools.
    cron-job-tool
  2. Select any of the Common Settings.
    common-settings
  3. Scroll down to give the command.

/usr/local/bin/php

/home/your_username/public_html/path/to/cron/script

  1. Click Add New Cron Job.
  2. You will be able to see the cron job added and if you have used the sample cron job provided above then you will be able to see a file generated at /home/your_username/public_html directory named current_time.txt.

Do More With cPanel

Conclusion

By following the steps in this article, you were able to deploy Vultr’s cPanel Marketplace Application and leverage the Cron Job feature of cPanel to run an automated cron job.

This is a sponsored article by Vultr. Vultr is the world’s largest privately-held cloud computing platform. A favorite with developers, Vultr has served over 1.5 million customers across 185 countries with flexible, scalable, global Cloud Compute, Cloud GPU, Bare Metal, and Cloud Storage solutions. Learn more about Vultr

The post How to Run Cron Jobs With cPanel on Vultr appeared first on SiteProNews.


Source: https://www.sitepronews.com/2024/08/27/how-to-run-cron-jobs-with-cpanel-on-vultr/


Before It’s News® is a community of individuals who report on what’s going on around them, from all around the world.

Anyone can join.
Anyone can contribute.
Anyone can become informed about their world.

"United We Stand" Click Here To Create Your Personal Citizen Journalist Account Today, Be Sure To Invite Your Friends.

Lion’s Mane Mushroom Nootropic

Mushrooms are having a moment. One fabulous fungus in particular, lion’s mane, may help improve memory, depression and anxiety symptoms. They are also an excellent source of nutrients that show promise as a therapy for dementia, and other neurodegenerative diseases. If you’re living with anxiety or depression, you may be curious about all the therapy options out there — including the natural ones.Our Lion’s Mane WHOLE MIND Nootropic Blend has been formulated to utilize the potency of Lion’s mane but also include the benefits of four other Highly Beneficial Mushrooms. Synergistically, they work together to Build your health through improving cognitive function and immunity regardless of your age. Our Nootropic not only improves your Cognitive Function and Activates your Immune System, But it benefits growth of Essential Gut Flora, further enhancing your Vitality.


 


Our Formula includes: Lion’s Mane Mushrooms which Increase Brain Power through nerve growth, lessen anxiety, reduce depression, and improve concentration. Its an excellent adaptogen, promotes sleep and improves immunity.


Shiitake Mushrooms which Fight cancer cells and infectious disease, boost the immune system, promotes brain function, and serves as a source of B vitamins.


Maitake Mushrooms which regulate blood sugar levels of diabetics, reduce hypertension and boosts the immune system.


Reishi Mushrooms which Fight inflammation, liver disease, fatigue, tumor growth and cancer. They Improve skin disorders and soothes digestive problems, stomach ulcers and leaky gut syndrome.


Chaga Mushrooms which have anti-aging effects, boost immune function, improve stamina and athletic performance, even act as a natural aphrodisiac, fighting diabetes and improving liver function.


Try Our Lion’s Mane WHOLE MIND Nootropic Blend 60 Capsules Today. Be 100% Satisfied or Receive a Full Money Back Guarantee. Order Yours Today by Following This Link.

Report abuse

Comments

Your Comments
Question   Razz  Sad   Evil  Exclaim  Smile  Redface  Biggrin  Surprised  Eek   Confused   Cool  LOL   Mad   Twisted  Rolleyes   Wink  Idea  Arrow  Neutral  Cry   Mr. Green

MOST RECENT
Load more ...

SignUp

Login

Newsletter

Email this story
Email this story

If you really want to ban this commenter, please write down the reason:

If you really want to disable all recommended stories, click on OK button. After that, you will be redirect to your options page.