Hi, Can anoyone tell me why this command is not executed (or it is without success) from crontab, but works perfectly from the command line ? (yes, i've restarted crontab service) # clean up postmaster 00 30 * * * root /usr/bin/find /var/qmail/maildirs/postmaster at telbit.pt/Maildir/new -type f -print0 | xargs -0 -n 50 rm The mind boggles... Any help would be appreciated. Warm Regards, M?rio Gamito
On 3/23/07, M?rio Gamito <gamito at gmail.com> wrote:> Hi, > > Can anoyone tell me why this command is not executed (or it is without > success) from crontab, but works perfectly from the command line ? > (yes, i've restarted crontab service) >It works from the command line? that's kind of surprising. It may work via tab completion in the shell, but will not work with that as typed. You'd suffer from shell expansion.> > # clean up postmaster > 00 30 * * * root /usr/bin/find > /var/qmail/maildirs/postmaster at telbit.pt/Maildir/new -type f -print0 | > xargs -0 -n 50 rmYou very likely need to escape the @ as the shell is probably trying to do something with it. -- During times of universal deceit, telling the truth becomes a revolutionary act. George Orwell
Mario:> Can anoyone tell me why this command is not executed (or it is > without success) from crontab, but works perfectly from the command > line ? > (yes, i've restarted crontab service) > > # clean up postmaster > 00 30 * * * root /usr/bin/find /var/qmail/maildirs/ > postmaster at telbit.pt/Maildir/new -type f -print0 | xargs -0 -n 50 rmIf that is the actual crontab entry, then it is not valid, as the second column is the hour (there is no hour 30). You probably want this: 30 00 * * * root /usr/bin/find /var/qmail/maildirs/ postmaster at telbit.pt/Maildir/new -type f -print0 | xargs -0 -n 50 rm Alfred