Make sure the cron job can be specified on this page, that the format is correct, and that the website programs use absolute paths:
Absolute Perl paths that can be used in cron jobs:
Table of Contents
Test command from CMD
Never run a custom PHP script from a terminal with a root account as this can cause security issues such as user privilege escalation
If the cron assignment itself was added correctly, and as you can clearly see from the logs, it actually ran, but unfortunately the client claims that cron is not working properly or there is a general problem with the script itself, then we can trythose reproduce the problem from the terminal.
su -l cpanelusername
If terminal access is not enabled for cpanel custom discount package features, we get the following error message:
We can get around this by specifying which shell to use:
You can check which shell is used for cron jobs yourself in cron-complete:
The most common problems with cron jobs in cPanel:
Poor PHP performance, missing required extension
When running PHP scripts from a device, clients generally use the following PHP option: /usr/local/bin/php , which indicates that the script is being run from the default version of PHP, and this is not always the same . it looks like the one your site is running on.
To learn more about this, visit this great cPanel FAQ webpage: PHP CGI and PHP CLI. What is the difference? and how to use them
If the client wants to run a script with an op Split by the latest PHP version, it wants to use the full path of that PHP version for you:
For the PHP EasyApache “ea” template, follow the instructions below, but be sure to replace XX with the version number:
For the PHP CloudLinux variant, use the following path, but be sure to replace XX with the version number:
Missing User Agent String In Wget Commands – Snuggle
If the cron job handles wget itself, be sure to test this key actual command from the terminal:
Instead of using the wget command, we use both Lynx and Curl, but remember that most shared hosting insurers currently use COMODO WAF mod_security rules, which in recent PHP updates actually replace the blocking of access to these commands without requiring a valid user agent. .
Introduction to individual COMP sections: Personnel
Be sure to allow others to use your computer. If necessary, create separate accounts on yours. Keep your password secret: Liquids [m, w]
Keep children and children away from the equipment. Do not drop computers or throw everything in a ditch.
Do not visit questionable/illegal websites (pornography, foreign sports, pirated software repositories). Do not purchase any software except from trusted sources. Never enter a computer password unless it ispart of a process that you understand and expect. Do not install card games. Never install Flash. In doubt? firstname.lastname@example.org