Documentation

Visit Our xCloud Knowledge Base

Here is your one-stop source for in-depth articles, FAQs, and tutorials for you to excel at hosting & managing your websites.


How To Add A Custom Cron Job In xCloud?

Custom cron jobs are like personal assistants for your website, executing specific tasks at predefined intervals. Whether it’s updating content, sending out emails, or performing maintenance, custom cronjobs tailor automation to your unique needs, saving time and ensuring efficiency in your online operations.

In xCloud, adding a custom cron job is a straightforward process that can be done directly from the xCloud dashboard. Letโ€™s see the complete guide on how to add a custom cron job in xCloud.

Add A Custom Cron Job In xCloud: Step-By-Step Guide #

Simply follow the below steps to add a custom cron job in xCloud to manage & execute specific tasks at a predefined timeframe.

Step 1: Login To Your Hosting Panel #

With the right credentials, log in to your xCloud dashboard.

log in-to-xCloud-panel

Step 2: Locate The Cron Job Settings #

From your xCloud dashboard, navigate to โ€˜All Serversโ€™, click on any server (if you have many), & get the Cron Jobs on the left sidebar of your server dashboard.

locate-custom-cron-jobs-from-dashboard

Step 3: Create a New Cron Job #

To create a new cron job, click on the โ€˜Add Cron Jobโ€™ on the following page. It will redirect you to the next of adding a custom cron job in xCloud.

add-a-custom-cron-job

Step 4: Specify The Schedule #

On the resulting page, execute the command, set the user, & determine the frequency of the cron job using the provided drop-down menu with predefined values.

In the ‘User‘ field, you can set both the root user & non root (site user, sudo user) user.

Note: If you want to execute WP-CLI command, you need to make it with site users.

set-cron-job-frequency

After choosing the type of script to run (PHP, curl, or wget) and specifying the command to execute. Once all this is done, click on โ€˜Saveโ€™ to save your configuration.

Moreover, you can set a custom schedule too. To do so, click on the โ€˜Customโ€™ option as shown below & set the โ€˜Custom Schedule.โ€™ With the below syntax in โ€˜Custom Scheduleโ€™, you can create any scheduling need.

1* * * * * /path/to/script.sh 2* * * * * command

custom-cron-jobs

In the above command, the 5 asterisk signs allow you to control minutes, hours, days, months, and days of weeks. The range includes:

  • Minute (Range: 0 to 59)
  • Hour (Range: 0 to 23)
  • Day of month (Range: 1 to 31)
  • Month (Range: 1 to 12)
  • Day of week (Range: 0 to 6, Sunday will count as 0)

Step 5: Save The Cron Job & See The Output #

Once everything is configured, your cron job will be listed under the Basic tab in xCloud. 

save-cron-job

This is how you can easily add a custom cron job in xCloud.

Still stuck? Contact our support team for any of your queries.

Where Cron Jobs Can Help You? #

Cron jobs are super handy for server admins, but they’re also pretty useful for web developers like you. Here’s how they can make your life easier:

Membership Management: Got a website with memberships? Set up cron jobs to handle account expirations. You can automatically deactivate or delete accounts based on their expiration dates.

Newsletter Automation: If you’re running a blog, cron jobs are great for sending out newsletter emails without you having to lift a finger.

Tracking Website Traffic: Keep tabs on your website traffic by saving every page visit in a database table. Cron jobs can help you store daily traffic summaries for easy analysis.

Managing Cached Data: Need to clear out old cached data files? Cron jobs can handle that task for you, keeping your website running smoothly.

Checking for Broken Links: Worried about broken links on your massive website? Cron jobs can automatically check for broken links and send you a report every day.

Handling Big Tasks: Sending tons of emails or encoding videos can take a while. Cron jobs can run command line scripts to handle these tasks efficiently in the background.

Social Media Updates: Social media marketers can use cron jobs to fetch recent tweets and cache them in a text file, making it easy to keep your website’s social content up to date.

What are your feelings
Updated on June 5, 2024

Server Name

RAM

SSD

xCloud Provider Price/m
(For LTD users)

VULTR Price/m

DO Price/m

Newcomer

1GB

25GB

$4.50

$5.00

$6.00

Basic

2GB

55GB

$9.00

$10

$12.00

Standard

4GB

80GB

$18.00

$20

$24.00

Professional

8GB

160GB

$36.00

$40

$48.00

Business

16GB

320GB

$72.00

$80

$96.00

Server Name

RAM

SSD/NVMe

xCloud Provider Price/m
(For LTD users)

VULTR Price/m

DO Price/m

Lite

1GB

32GB

$5.40

$6.00

$8.00

Personal

2GB

88GB

$16.20

$18.00

$24.00

Growing

4GB

128GB

$21.60

$24.00

$32.00

Elite

8GB

256GB

$43.20

$48.00

$64.00

Titanium

8GB

384GB

$86.40

$96.00

$96.00

Ultimate

32GB

512GB

$172.80

$192.00

$192.00