Cron

Página superior
Adjuntos:
Obtener este mensaje como un correo
+ (text/plain)
Eliminar este mensaje
Responder a este mensaje
Autor: Matt Alexander
Fecha:  
Asunto: Cron
On Fri, 20 Dec 2002, Jim wrote:

> I decided that one way to back up a database is to write a bash script to run
> mysqldump. I know that I can put the script in /etc/cron.weekly and have it
> execute every week. My question is what user will the cron job run as?


Cron runs as root, but you should be able to do something like:

su - mysqluser -c "mysqldump mydatabase > /someplace/mydatabase.sql"