Problema con cron

Iniciado por jalucerol, Abril 07, 2014, 10:05:04 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Abril 07, 2014, 10:05:04 PM Ultima modificación: Abril 08, 2014, 09:40:09 PM por Expermicid
Hola, quizas  no sea el lugar adecuado para postear, si es asi y deben mover el post no hay problema.

Bueno, la cuestion es como sigue:

1.- tengo una camara IP, de la cual quiero grabar video a intervalos regulares, longitud del video 60 segundos, cada 5 minutos.
2.- adapte un script para capturar video:

Código: php
#!/bin/bash

NEW_NAME="cam1-"$(date +%d)"."$(date +%m)"."$(date +%y)"-hour"$(date +%H)"-"$(date +%M)".avi"
nohup /usr/bin/curl -s -m 60 -o /media/Flash/$NEW_NAME --user *****:***** http://192.168.1.3:8000/videostream.cgi?user=*****&pwd=*****&resolution=8


este se llama No tienes permitido ver los links. Registrarse o Entrar a mi cuenta
3.- lo hice ejecutable
4.- lo registre en crontab

Código: php
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
5/5 * * * * root /home/juan/record.sh


El tema es que graba video a los 5 minutos de cada hora... y nunca mas...

cual puede ser el furcio????

bue, ya le saque la ficha. Resulta que por terminal tire este comando:

Código: php
sudo crontab -u  root -e


eso modificaba una lista de tareas, pero no se por que diablos ubuntu no la ejecuta. Asi que leyendo leyendo me entere que era mejor que meter ese comando, este otro:

Código: php
sudo nano /etc/crontab


Y con eso voilâ!!!! anduvo de pelicula.

Espero que les sirva a alguien.