Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/04/2011, 07:41
Avatar de Aquaventus
Aquaventus
 
Fecha de Ingreso: junio-2010
Ubicación: Lima-Peru , En el alba de la naturaleza
Mensajes: 2.105
Antigüedad: 13 años, 10 meses
Puntos: 267
Respuesta: Error: No permite realizar el backup de la bd

Hola Geovanny0401!, has hecho seguimiento a tu codigo colocandole breakpoints? para determinar si la hora que toma es la indicada?, intenta cambiando algunas lineas de esta manera :

Código vb.net:
Ver original
  1. Copia de seguridad
  2.             'Dim hora As TimeSpan = Date.Now.TimeOfDay()
  3.             Dim txtHora As String = DateTime.Now.ToString("HH:MM")
  4.             Dim swBkp As Boolean = False
  5.             'Es Recomendable que hagas comparación con el Equals
  6.             If txtHora.Equals("18:00") Then
  7.                 Dim Ruta As [String] = "", Comando As [String] = "", Arg As [String] = ""
  8.                 Ruta = (Application.StartupPath.Replace("\\", "/") & "/") & DateTime.Now.ToString("yyyy-MM-dd")
  9.                 If Not swBkp Then
  10.                     swBkp = True
  11.                     Dim Pr As New Process()
  12.                     Pr.EnableRaisingEvents = False
  13.                     Pr.StartInfo.UseShellExecute = False
  14.                     Pr.StartInfo.RedirectStandardOutput = True
  15.                     Pr.StartInfo.FileName = "mysqldump"
  16.                     Pr.StartInfo.Arguments = "--opt --force --host=localhost --user=root --password=root --databases rs -r" & Ruta & ".sql"
  17.                     Pr.Start()
  18.                 End If
  19.             End If
  20.  
  21.         Catch ex As Exception
  22.  
  23.         End Try

Pruebalo y nos comentas. Saludos!.
__________________
Internet es tener todo el conocimiento global a tu disposición.
Desarrollo de Software - Ejemplos .Net