[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [NOVICE] Cron problemer.



Jesper Krogh wrote:
I sslug.novice, skrev Kim Monberg:

Hej Gutter, lige en ting mere..

Jeg har selvf. crontab, med en masse kommandoer..

Den ene kommando skalskrive resultatet til en fil..

Den skriver også filen, men putter ikke resultatet i filen, men laver bare en tom fil..

Hvis jeg udfører nøjagtig samme kommando i konsollen som root skriver den det til filen som den skal..

Jeg vil tro det er noget med rettigheder, men ved ikke lige hvor jeg skal ændre dem henne, selve filen der skal skrives til er fuldt skrivbar med mod 777.. så der burde det jo ikke være galt.

Nogen der har et skud?


Skriv din kommando ind i et shellscript Ala dette.

--- start herunder --
#!/bin/bash

echo "test" >> /var/log/logfil.log

-- slut her ---

Hvor du ændrer "echo" -linien med det du vil køre, gem filen og gør den
eksekverbar med chmod a+x filnavn og se om det virker. Hvis det virker,
så laver du cronjobbet med /sti/til/filnavn i stedet for kommandoen
direkte. Det gør ikke nogen forskel, men det gør problemer meget nemmere
at debugge.

Jeg takker for svarene, Jespers løsning hjalp, jeg smed et script i cron.hourly hvilket gjorde at det hele funker som det skal nu.


Mvh:
Kim


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 21:20 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *