visad88

Registered
Sep 20, 2019
4
0
1
Montreal
cPanel Access Level
Root Administrator
First of all, let's say it. Your API is a reaaaaal mess.
What the point of having 15 versions of your API ? considering that eaccccccch update, your API script will no longer work ?

Seriously, cPanel API 1, cPanel API 2, WHM API 1 , WHM API 2 ? What the hells for real ?

Anyway, let's go to my point.

Why this line won't be added as curl call ?

$queryCron = "https://" . $serveraddr . "/json-api/cpanel?cpanel_jsonapi_user=$username&cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=Cron&cpanel_jsonapi_func=add_line&command=/home/$username/public_html/subfolder/cron.php&day=1&hour=0&minute=0&month=0&weekday=*";

(The error is from this line since i got some other CURL call working using the same script, only query (URL) change.

I never ever rushed like this working with API. Seriously, you should consider remake your entire API system. Waste of time.

PS: I've been rewriting this API call probably each month, which is totally unnacceptable for a paid license.

The next step for our business is to sue cPanel if API call won't stay stable and need to be rewrited each fuckin time. This is a stupid waste of time. This need to be fixed or i swear to god i will take every cPanel license owner sue cPanel for unstable API since day 1.

We pay 30 USD each month to get unstable API, WTF is that ?
 
Last edited:

visad88

Registered
Sep 20, 2019
4
0
1
Montreal
cPanel Access Level
Root Administrator
It was clearly related to the issues. There's no "'harsh" language, i'm just talking about my experience with cPanel API while i'm paying the highest price (380$/year and this is not a one time fees) on the market to have a webhost panel.

So yeah, i'm a customer talking about my experience. So the title was 100% related to this topic, you just didn't approved it because it talk against cPanel service.

There's 100% a need to use a harsh languange because it look like your developer don't give a ......... about developer who using cPanel or WHM API and need to review code update it eaaaaaaaach update you made (something like each week).

Clearly mister "Infopro", you won't allow nothing here talking against cPanel service. Pathetic again and again.

You should stop being in the IT world if you won't allow any bad review.
So please, "Infoman", stop being in a topic that you can't understand.
You need to stop what you're doing if you can't accept bad feedback.
 
Last edited:

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
7,478
591
263
Houston
cPanel Access Level
DataCenter Provider
Hello,

We'd like to understand what exactly the issue with the cron you're experiencing is. What is the error you're receiving? There's no part of the cpapi2 that has changed every month. Furthermore, while we do have cpapi1, cpapi2 and UAPI - cpapi1 is deprecated and we are working on transitioning all cpapi functions to UAPI.
 

cPanelTJ

Product Owner
Staff member
Jan 29, 2019
27
8
78
Houston, TX
cPanel Access Level
Root Administrator
Twitter
Hi @visad88 ,

I believe the problem with your http request is that "month" for a cron job does not accept a value of "0."

Here are some popular options for the "month" field:
  • * - all months
  • */2 - every other month
  • */4 - every 3rd month
  • 1/7 - every 6 months
  • 1 - January
  • 2 - February
  • 3 - March
  • 4 - April
  • 5 - May
  • 6 - June
  • 7 - July
  • 8 - August
  • 9 - September
  • 10 - October
  • 11 - November
  • 12 - December