Crear CronJob con cURL en cPanel

El comando ideal a usar seria algo como ejemplo:

 

```

/usr/bin/curl http://domain.com/page.php

 

```

El uso de CURL es la manera correcta y segura.

 

Ha intentando con esta variante?

 

Si está intentando ejecutar un trabajo cron en un alojamiento compartido, es importante tener en cuenta que wget está deshabilitado por razones de seguridad.

 

En su lugar, puede utilizar curl si necesita descargar un archivo remoto, asegurándose de definir también un user-agent para que no active un error de ModSecurity:

 

```

/usr/bin/curl -o cron.txt http://example.com

```

Ejemplo completo:

 

```

/usr/bin/curl --user-agent CronJob --retry 1 --max-time 60 -o cron.txt http://example.com

```

  • cURL, CronJob, cpanel, ejemplos
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to configure Office 365 DNS with cPanel

To set up Microsoft Office 365, login to cPanel, and modify following records for the domain(s)...

CPanel "IP address has changed" error

cPanel will sometimes throw out the error "IP address has changed!" while you trying to connect....