On cPanel servers, you need to have permissions granted on the server to be able to add cron jobs (scheduled tasks). If your cron permissions have not
been granted, you will encounter an error like the one below when you try to add and run a cron job.
You (username) are not allowed to use this program (/usr/bin/crontab)When you see this error, what you need to do is activate your cron permissions on the server. If you are using a shared hosting service, you can request your hosting company to enable your cron permissions.
However, if you are using a server where you have root access, the following steps are sufficient.
After making an SSH connection to the server as root, run the following command.
nano /etc/cron.allowWhen you run the command, you will have opened the cron.allow file. If there are users whose cron permission was previously granted inside this file, you can see their usernames listed one below the other.
If there are no users, you will only see root as the entry. Write the cPanel username of the account for which you want to enable cron execution directly below root, then save and exit. Finally, to ensure the operation works correctly, you can restart the service with
the /etc/init.d/crond restart command.

Leave a Comment
* Your comment will be published after approval.
Comments
0No comments yet. Be the first to comment!