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:
/usr/local/bin/php
/usr/local/cpanel/3rdparty/bin/php
/usr/local/cpanel/3rdparty/php/73/bin/
/opt/cloudlinux/alt-php73/root/usr/bin/php
/opt/cpanel/ea-php73/root/usr/bin/php
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:
crontab -e
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:
/opt/cpanel/ea-phpXX/root/usr/bin/php
For the PHP CloudLinux variant, use the following path, but be sure to replace XX with the version number:
/opt/cloudlinux/alt-phpXX/root/usr/bin/php
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:
wget https://pcx3.com/awesom-file.zip
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? cron@mit.edu
Practice restoring files directly from backups using your primary computer and/or, in the case of Code42, as you would from any other device [M,W,Code42]
Prepare a specific plan B:
Create your own account associated with your spouse/other computer. Prepare an account with vouchers, zoom in, or prepare an iPad or Blackberry.
Test media access and presentation from a second device. This test is to upload an insured file to an optional b OK [M, W, Code42 ]
Create a C-Plan [faculty]:
Take a one-week break from your course in case you cancel due to technical issues.
Prepare a mailing list for the course.
Save a hard copy with course materials.
In Case Of Emergency
Don’t panic
If liquid is spilled on the laptop, immediately turn off the device and leave it in the fully open position for 72 hours without a lid. Contact cron@mit.edu
Turn off your devices, unplug them from the dock (if applicable), unplug all peripherals, wait a few minutes or so, take a deep breath, and turn them back on. Fixed? otherwise cron@mit.edu
If cron is not available and there is a problem using the computer:
Try the troubleshooting tips here; [M, F]. Don’t continue if you’re even a little confused. Wait for cron to come back online
Contact support.apple.com or contactSeek support from your hardware vendor.
Also, steer clear of the party advice you find on the Internet. Most of them are bad
If Cron is somehow unavailable and there is a problem with an MIT related service: certificates, Zoom, Canvas, Atlas, SAPgui, email, etc.