Predefined Cron for all new accounts?
Hello, a question I can't answer. Is there any way to predefine a Cron task that already appears by default configured in all new accounts when creating them??
thanks
-
Hello, Yes, you can setup a custom bash script that makes use of the Cron::add_line cPanel API 2 function. Then, configure the custom bash script to automatically run during the account creation process as part of a post account creation hook. Here's some documentation to get you started: cPanel API 2 Functions - Cron::add_line - Developer Documentation - cPanel Documentation Tutorial - Create a Standardized Hook - Developer Documentation - cPanel Documentation Guide to Standardized Hooks - Whostmgr Functions - Developer Documentation - cPanel Documentation Thank you. 0 -
Hello, Yes, you can setup a custom bash script that makes use of the Cron::add_line cPanel API 2 function. Then, configure the custom bash script to automatically run during the account creation process as part of a post account creation hook. Here's some documentation to get you started: Tutorial - Create a Standardized Hook - Developer Documentation - cPanel Documentation
0 -
Hello, Yes, manually editing the /var/spool/cron/$username file is also a valid method of setting up the cron job. Note that if you are assigning the account "No Shell" or "Jailed Shell Access", the first line in the user's cron file should match the following: SHELL="/usr/local/cpanel/bin/jailshell"
Thank you.0
Please sign in to leave a comment.
Comments
3 comments