This API is deprecated and will stop processing data on Feb 25, 2025. Please use our new EasyCron API v1 instead.

Cron Job API Method: enable

Description

Enable a cron job.

Arguments

token (Required)
You API token. Check authentication section for details.
id (Required)
ID of the cron job you want to enable.

Example Request

https://www.easycron.com/rest/enable?token=[token]&id=2107

In above example, [token] should be replaced with the true token string.

Example Success Response (in JSON format)

{"status":"success","cron_job_id":"2107"}

Above example response is equal to the following array:

Array
(
    [status] => success
    [cron_job_id] => 2107
)

Example Error Response (in JSON format)

If you use an invalid token, you may receive following error response:

{"status":"error","error":{"code":"1","message":"Wrong API token."}}

The equal readable array is:

Array
(
    [status] => error
    [error] => Array
        (
            [code] => 1
            [message] => Wrong API token.
        )

)

If there is something wrong with the arguments, you may receive other errors:

code: 23

message: You don't have enough EPDs to enable the cron job.

code: 24

message: An error occurred when enabling the cron job.

code: 25

message: The cron job ID is invalid.

If you make too much API requests in one day, you may receive following error:

code: 26

message: You have exceeded your max daily API request limit.

If you don't have enough cron job quota to enable the cron job, you may receive following error:

code: 27

message: You don't have enough cron job quota to enable the cron job.

code: 39

message: Your plan has expired. Please renew your plan first.