Skip to content

Cron

All operations require authentication.

6 operationsv1/hosting/web
Agent setup

List cron jobsProduction

GET
/1.0/hosting/web/{serviceName}/cron

Returns the IDs of the cron jobs of the hosting. Filter them by command, description, email or language.

Path parameters

serviceName
required
string

Service name

Query parameters

command
string

Filter the value of command property (like)

description
string

Filter the value of description property (like)

email
string

Filter the value of email property (like)

language
LanguagesEnum

Filter the value of language property (=)

Valuesnode10node11node12node14node8node9otherphp4php5.2php5.3php5.4php5.5php5.6php7.0php7.1php7.2php7.3php7.4php8.0php8.1php8.2php8.3php8.4php8.5python2python3ruby2.6

Response

200integer[]successful operation

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cron \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ 0]

Get a cron jobProduction

GET
/1.0/hosting/web/{serviceName}/cron/{id}

Returns the command, frequency, language, email and status of the cron job.

Path parameters

id
required
integer

Id

serviceName
required
string

Service name

Response

200Cronsuccessful operation
command
required
string

Command to execute

description
string

Description field for you

email
string

Email used to receive error log (stderr)

frequency
required
string

Frequency (crontab format) defined for the script (minutes are ignored)

id
read-only
integer

Cron's id

language
required
LanguagesEnum

Cron language

Valuesnode10node11node12node14node8node9otherphp4php5.2php5.3php5.4php5.5php5.6php7.0php7.1php7.2php7.3php7.4php8.0php8.1php8.2php8.3php8.4php8.5python2python3ruby2.6
state
read-only
StateEnum

Cron language

Valuescreatedcreatingdeletingupdating
status
StatusEnum

Cron status

Valuesdisabledenabledsuspended

Example uses id = 0, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cron/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "command": "string", "description": "string", "email": "string", "frequency": "string", "id": 0, "language": "node10", "state": "created", "status": "disabled"}

List cron languagesProduction

GET
/1.0/hosting/web/{serviceName}/cronAvailableLanguage

Returns the languages a cron job can use on the hosting.

Path parameters

serviceName
required
string

Service name

Response

200LanguagesEnum[]successful operation

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cronAvailableLanguage \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "node10"]

Create a cron jobProduction

POST
/1.0/hosting/web/{serviceName}/cron

Creates a cron job that runs a script at a crontab frequency, and returns the task. Minutes in the frequency are ignored. Errors are sent to the email address.

Path parameters

serviceName
required
string

Service name

Request body (required)

command
required
string

Command to execute

description
string

Description field for you

email
string

Email used to receive error log (stderr)

frequency
required
string

Frequency (crontab format) defined for the script (minutes are ignored)

id
read-only
integer

Cron's id

language
required
LanguagesEnum

Cron language

Valuesnode10node11node12node14node8node9otherphp4php5.2php5.3php5.4php5.5php5.6php7.0php7.1php7.2php7.3php7.4php8.0php8.1php8.2php8.3php8.4php8.5python2python3ruby2.6
state
read-only
StateEnum

Cron language

Valuescreatedcreatingdeletingupdating
status
StatusEnum

Cron status

Valuesdisabledenabledsuspended

Response

200PublicTasksuccessful operation
doneDate
read-only
stringdate-time

Done date

function
read-only
FunctionEnum

Task function

Valuesabuse/closeabuse/createabuse/create/webabuse/delete/webabuse/updateabuse/update/webagora/AnycastUpdateReferenceagora/DnsAddonUpdateReferenceagora/DnsUpdateReferenceagora/updateReferenceattachedDomain/createattachedDomain/deleteattachedDomain/restartattachedDomain/updatecdn/deletecdn/domain/createcdn/domain/deletecdn/domain/flushcdn/domain/suspendcdn/flushcdn/installcdn/reopencdn/suspendcdn/upgradecluster/setDevelopmentcluster/setTestingcluster/ssl/deploycluster/ssl/renewcluster/test/attachedDomainscluster/test/cdncluster/test/cronscluster/test/emailscluster/test/fileBrowsercluster/test/hostedsslcluster/test/modulescluster/test/ovhConfigcluster/test/userLogscluster/test/usersconfiguration/createconfiguration/deleteconfiguration/updatecron/createcron/deletecron/updatedatabase/changePassworddatabase/changePasswordTestdatabase/changeRightdatabase/changeRightTestdatabase/checkQuotaNowdatabase/copydatabase/copyRestoredatabase/createdatabase/deletedatabase/deleteTestdatabase/dumpAnyDaydatabase/hostUpdatedatabase/importdatabase/optimizedatabase/restorededicatedIp/deletededicatedIp/reopendedicatedIp/suspenddepc/pushdump/createdump/deleteenvVar/createenvVar/deleteenvVar/updateenvVar/upgradeeventbus/pushfilerz/customerMonitoringfilerz/deletehostedssl/assignFreeKeyhostedssl/cdn/updatehostedssl/createhostedssl/deletehostedssl/globalsign/deletehostedssl/htaccess/installhostedssl/importhostedssl/installhostedssl/install/sectigohostedssl/iplb/reloadhostedssl/pushhostedssl/pushDcvFilehostedssl/regeneratehostedssl/repushhosting/activate/privateDatabasehosting/basculementhosting/changeOffer/cloudhosting/changeOffer/sharedhosting/changementhosting/deletehosting/delete_start1mhosting/installhosting/reopenhosting/suspendindy/reopenindy/suspendinfra/certificate/deployinfra/certificate/generateinfra/certificate/installinfra/sharedsql/upgradeinfra/ssl/deployinfra/ssl/renewip/moveip/parklocalSeoAccount/createlocalSeoAccount/deletelocalSeoLocation/deletelocalSeoLocation/installlocalSeoLocation/reopenlocalSeoLocation/suspendlocalSeoVisibilityCheck/processmailsout/checkMailsoutQueuemailsout/flushMailsoutQueuemailsout/updateUserInRedismigration/copyUsersmigration/dday/filerzmigration/dday/listPrivateDatabasesmigration/dday/lotmigration/dday/updateInfra/cronsmigration/dday/updateInfra/dedicatedmigration/dday/updateInfra/migratedFqdnmigration/updateOrtmodule/changePasswordmodule/createmodule/deletemodule/installmonitoring/remotewritenotification/sendovhConfig/refreshovhConfig/rollbackovhConfig/updateovhOrg/deleteownLogs/createownLogs/deleteprovisionning/cdnprovisionning/clusterprovisionning/filerzprovisionning/filerz_logprovisionning/hostingprovisionning/ipfoprovisionning/ipifoprovisionning/iplbprovisionning/privatesqlprovisionning/sharedsqlprovisionning/sslprovisionning/webprovisionning/webappruntime/createruntime/deleteruntime/setDefaultruntime/updatescan/createsqlperso/deletesqlperso/installsqlperso/reopensqlperso/suspendsynchronizeDepc/attachedDomainsynchronizeDepc/clustersynchronizeDepc/databasesynchronizeDepc/filersynchronizeDepc/offersynchronizeDepc/webdtest/migrationuser/changePassworduser/createuser/deleteuser/updateuserLogs/changePassworduserLogs/createuserLogs/deleteuster/setTestingweb/changeDnsweb/changeFilerzweb/changeFilerzWithCallbackweb/changeJailStateweb/changeOutStateweb/changeStateweb/changeWebStateweb/checkQuotaNowweb/createweb/deleteweb/deleteUserweb/restoreSnapshotwebProvisionningwebd/changeSlotswebsite/createwebsite/deletewebsite/deploywebsite/vcs/createwebsite/vcs/deletewebsite/vcs/deploy
id
read-only
integer

Task's id

lastUpdate
read-only
stringdate-time

Last update date

objectId
read-only
string

Task object id

objectType
read-only
ObjectTypeEnum

Task object type

ValuesAbuseAttachedDomainBlockedIpCdnCronDatabaseDeploymentDumpEnvVarFilerzHostedsslHostingIndyInfraMinorModuleOtherOvhConfigOvhOrgOwnLogsRuntimeScanSqlpersoUserUserLogsWebWebdWebsite
startDate
read-only
stringdate-time

Start date

status
read-only
StatusEnum

Task status

Valuescancelleddoingdoneinittodo

Example uses serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cron \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "doneDate": "2024-01-01T12:00:00Z", "function": "abuse/close", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "objectId": "string", "objectType": "Abuse", "startDate": "2024-01-01T12:00:00Z", "status": "cancelled"}

Delete a cron jobProduction

DELETE
/1.0/hosting/web/{serviceName}/cron/{id}

Deletes the cron job and returns the task.

Path parameters

id
required
integer

Id

serviceName
required
string

Service name

Response

200PublicTasksuccessful operation
doneDate
read-only
stringdate-time

Done date

function
read-only
FunctionEnum

Task function

Valuesabuse/closeabuse/createabuse/create/webabuse/delete/webabuse/updateabuse/update/webagora/AnycastUpdateReferenceagora/DnsAddonUpdateReferenceagora/DnsUpdateReferenceagora/updateReferenceattachedDomain/createattachedDomain/deleteattachedDomain/restartattachedDomain/updatecdn/deletecdn/domain/createcdn/domain/deletecdn/domain/flushcdn/domain/suspendcdn/flushcdn/installcdn/reopencdn/suspendcdn/upgradecluster/setDevelopmentcluster/setTestingcluster/ssl/deploycluster/ssl/renewcluster/test/attachedDomainscluster/test/cdncluster/test/cronscluster/test/emailscluster/test/fileBrowsercluster/test/hostedsslcluster/test/modulescluster/test/ovhConfigcluster/test/userLogscluster/test/usersconfiguration/createconfiguration/deleteconfiguration/updatecron/createcron/deletecron/updatedatabase/changePassworddatabase/changePasswordTestdatabase/changeRightdatabase/changeRightTestdatabase/checkQuotaNowdatabase/copydatabase/copyRestoredatabase/createdatabase/deletedatabase/deleteTestdatabase/dumpAnyDaydatabase/hostUpdatedatabase/importdatabase/optimizedatabase/restorededicatedIp/deletededicatedIp/reopendedicatedIp/suspenddepc/pushdump/createdump/deleteenvVar/createenvVar/deleteenvVar/updateenvVar/upgradeeventbus/pushfilerz/customerMonitoringfilerz/deletehostedssl/assignFreeKeyhostedssl/cdn/updatehostedssl/createhostedssl/deletehostedssl/globalsign/deletehostedssl/htaccess/installhostedssl/importhostedssl/installhostedssl/install/sectigohostedssl/iplb/reloadhostedssl/pushhostedssl/pushDcvFilehostedssl/regeneratehostedssl/repushhosting/activate/privateDatabasehosting/basculementhosting/changeOffer/cloudhosting/changeOffer/sharedhosting/changementhosting/deletehosting/delete_start1mhosting/installhosting/reopenhosting/suspendindy/reopenindy/suspendinfra/certificate/deployinfra/certificate/generateinfra/certificate/installinfra/sharedsql/upgradeinfra/ssl/deployinfra/ssl/renewip/moveip/parklocalSeoAccount/createlocalSeoAccount/deletelocalSeoLocation/deletelocalSeoLocation/installlocalSeoLocation/reopenlocalSeoLocation/suspendlocalSeoVisibilityCheck/processmailsout/checkMailsoutQueuemailsout/flushMailsoutQueuemailsout/updateUserInRedismigration/copyUsersmigration/dday/filerzmigration/dday/listPrivateDatabasesmigration/dday/lotmigration/dday/updateInfra/cronsmigration/dday/updateInfra/dedicatedmigration/dday/updateInfra/migratedFqdnmigration/updateOrtmodule/changePasswordmodule/createmodule/deletemodule/installmonitoring/remotewritenotification/sendovhConfig/refreshovhConfig/rollbackovhConfig/updateovhOrg/deleteownLogs/createownLogs/deleteprovisionning/cdnprovisionning/clusterprovisionning/filerzprovisionning/filerz_logprovisionning/hostingprovisionning/ipfoprovisionning/ipifoprovisionning/iplbprovisionning/privatesqlprovisionning/sharedsqlprovisionning/sslprovisionning/webprovisionning/webappruntime/createruntime/deleteruntime/setDefaultruntime/updatescan/createsqlperso/deletesqlperso/installsqlperso/reopensqlperso/suspendsynchronizeDepc/attachedDomainsynchronizeDepc/clustersynchronizeDepc/databasesynchronizeDepc/filersynchronizeDepc/offersynchronizeDepc/webdtest/migrationuser/changePassworduser/createuser/deleteuser/updateuserLogs/changePassworduserLogs/createuserLogs/deleteuster/setTestingweb/changeDnsweb/changeFilerzweb/changeFilerzWithCallbackweb/changeJailStateweb/changeOutStateweb/changeStateweb/changeWebStateweb/checkQuotaNowweb/createweb/deleteweb/deleteUserweb/restoreSnapshotwebProvisionningwebd/changeSlotswebsite/createwebsite/deletewebsite/deploywebsite/vcs/createwebsite/vcs/deletewebsite/vcs/deploy
id
read-only
integer

Task's id

lastUpdate
read-only
stringdate-time

Last update date

objectId
read-only
string

Task object id

objectType
read-only
ObjectTypeEnum

Task object type

ValuesAbuseAttachedDomainBlockedIpCdnCronDatabaseDeploymentDumpEnvVarFilerzHostedsslHostingIndyInfraMinorModuleOtherOvhConfigOvhOrgOwnLogsRuntimeScanSqlpersoUserUserLogsWebWebdWebsite
startDate
read-only
stringdate-time

Start date

status
read-only
StatusEnum

Task status

Valuescancelleddoingdoneinittodo

Example uses id = 0, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cron/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "doneDate": "2024-01-01T12:00:00Z", "function": "abuse/close", "id": 0, "lastUpdate": "2024-01-01T12:00:00Z", "objectId": "string", "objectType": "Abuse", "startDate": "2024-01-01T12:00:00Z", "status": "cancelled"}

Update a cron jobProduction

PUT
/1.0/hosting/web/{serviceName}/cron/{id}

Updates the command, frequency, language, email or description of the cron job. Minutes in the frequency are ignored.

Path parameters

id
required
integer

Id

serviceName
required
string

Service name

Request body (required)

command
required
string

Command to execute

description
string

Description field for you

email
string

Email used to receive error log (stderr)

frequency
required
string

Frequency (crontab format) defined for the script (minutes are ignored)

id
read-only
integer

Cron's id

language
required
LanguagesEnum

Cron language

Valuesnode10node11node12node14node8node9otherphp4php5.2php5.3php5.4php5.5php5.6php7.0php7.1php7.2php7.3php7.4php8.0php8.1php8.2php8.3php8.4php8.5python2python3ruby2.6
state
read-only
StateEnum

Cron language

Valuescreatedcreatingdeletingupdating
status
StatusEnum

Cron status

Valuesdisabledenabledsuspended

Response

200stringsuccessful operation

Example uses id = 0, serviceName = string

$ curl https://api.eu.ovhcloud.com/1.0/hosting/web/{serviceName}/cron/{id} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
"string"