How to Set up System Based Cron Job in WordPress?

I have a WordPress website, where I added some custom cron jobs. I know wp-cron is not a real cron job, it runs when the page is loaded. But right now I don’t have much traffic so my cron job misses the schedules. So I want to set up a system-based cron job for my website. However, I’m not quite sure how to set it up. Could someone guide me on creating a system-based cron job for WordPress?

To set up a system-based cron job in WordPress, follow these simple steps:

  1. Open the wp-config.php file in a text editor.
  2. Add the following line before the /* That's all, stop editing! Happy blogging. */ line.
define('DISABLE_WP_CRON', true);
  1. Log into your cPanel account.
  2. Open the “Cron Jobs” application in the “Advanced” section of cPanel.
  3. Add the following command
wget -q -O - http://example.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

Or

/usr/bin/php -q /path-to-your-wp-installation/wp-cron.php
  1. Replaced “example.com” with your domain name.