Hi,
I'm trying to setup cron job to delete emails. I've been searching in this forum and tried to replicate what in there.
Here's what I setup:
1. Created a folder named cron-jobs. The location is under home/user/cron-jobs. And the permission is 0755.
2. I created a file named deletemail_it.sh. The permission is 0744
The code is
3. Cron Job setting is:
Result:
1. Once the cron job runs, I received this email
2. Once I checked the mailbox. The emails are still there
Note: The mailbox contains 3 emails dated 2018.
Did I configure wrong somewhere in my settings?
Thanks in advance
I'm trying to setup cron job to delete emails. I've been searching in this forum and tried to replicate what in there.
Here's what I setup:
1. Created a folder named cron-jobs. The location is under home/user/cron-jobs. And the permission is 0755.
2. I created a file named deletemail_it.sh. The permission is 0744
The code is
Code:
#!/bin/sh
find /home/example/mail/example.com/it/cur -type f -mtime +90 -exec rm {} \;
Code:
/usr/local/bin/php /home/example/cron-jobs/deletemail_it.sh
1. Once the cron job runs, I received this email
Code:
find /home/example/mail/example.com/it/cur -type f -mtime +90 -exec rm {} \;
Note: The mailbox contains 3 emails dated 2018.
Did I configure wrong somewhere in my settings?
Thanks in advance