Skip to main content

WHMAPI1 works from SSH, but not in CRON job

Comments

4 comments

  • cPanelKenneth
    The whmapi1 binary is not in the PATH environment used by cron. You can fix this in one of two ways: 1. Add the whmapi1 directory path to PATH in either cron or your script; or 2. Use the full path to the whmap1 binary in your script
    0
  • domeneas
    Thanks, spot on. which whmapi1 gave me the path and I just added that to the script and called it directly.
    0
  • DDSameera
    I faced similar issue. Here is the solution /usr/local/cpanel/bin/whmapi1 createacct username='acc100' domain='test.srilanka.com'
    0
  • domeneas
    I would just like to add that I had the same problem again. Googled it, and found this thread, my own thread, 4 years later, giving me the solution...again. /usr/sbin/whmapi1 editquota user=$username quota=$newquota
    0

Please sign in to leave a comment.