LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Send an email reminder in every 30days using ftp (https://www.linuxquestions.org/questions/linux-newbie-8/send-an-email-reminder-in-every-30days-using-ftp-4175641086/)

Babuketha 10-25-2018 12:40 AM

Send an email reminder in every 30days using ftp
 
Hi friends, Actually i don't know how to use cron job in ftp to sending email reminder.Please help me

berndbausch 10-25-2018 12:57 AM

The crontab(5) man page tells you how to define an activity once a month. I don't know if it's possible to do something every 30 days; you may be more successful with the at command.

To do something at midnight on the first day of the month:

Code:

$ crontab
1 0 1 * *    something

The first number is the minute, then the hour, day of month, month and day of week. Asterisks mean "any".

Alternatively:
Code:

$ crontab
@monthly      something

Now, I can't tell you how to send an email reminder via ftp. Perhaps you can elaborate what you mean by that. But I can tell you how to send an email reminder:
Code:

$ crontab
@monthly    echo "don't forget to tie your shoelaces" | mailx -s Reminder you@yourdomain.org

You could also do it this way:
Code:

$ crontab
@monthly    echo "don't forget to tie your shoelaces"

since cron sends you command output in an email, but in this case you have no control over the recipient nor the subject.

Babuketha 10-25-2018 01:09 AM

Thank you


All times are GMT -5. The time now is 03:15 PM.