From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078611110517.tru64-unix-managers.marc@archive.invalid> From: Bill Bergman Date: Fri, 18 Apr 1997 12:35:38 +0000 To: tru64-unix-managers Subject: SUMMARY: cron job won't run X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078611110517 I received about 20 replies to my inquiry. Most of them said that they were successfully running the same script. A few others said the same thing happened to them. Several people asked if find was in the path. Yes. But I began to play around with the various parts of the command and I now have it working in a slightly modified form. The original command still doesn't work. 40 4 * * * find /var/adm/syslog.dated -depth -type d -ctime +5 -exec rm -rf {} \; But if I change -ctime to -mtime the command works. 40 4 * * * find /var/adm/syslog.dated -depth -type d -mtime +5 -exec rm -rf {} \; I don't understand this well enough to understand why -ctime won't work and -mtime will. The man pages for find describes the two expressions like this: -ctime number TRUE if the file inode was changed in the past number days, where number is interpreted as described in this reference page. -mtime number TRUE if the file was modified in the past number days, where number is interpreted as described in this reference page. I think that both expressions should be true but obviously the first is not. I'm not sure what this is telling me. Maybe somebody out there can explain this. > > Can anyone tell me why this cron job doesn't work? It is the same root > crontab entry that is running successfully on 5 other machines. On this > machine the syslog.dated directories must be deleted manually. I've tried > deleting the line and re-entering it. Nothing works. All the other root > cron jobs run fine. And this job used to run. I tried copying the entry > from the root crontab file on a machine where its running and pasting it > in. No go. I even tried typing the command and running the job. Nothing. > > > 40 4 * * * find /var/adm/syslog.dated -depth -type d -ctime +5 -exec rm -rf {} \; Bill Bergman Westinghouse Communications (412) 247-6206 wrb@wcsmail.com