<script type="module">
import monthlyReminder from 'https://cdn.skypack.dev/monthly-reminder';
</script>
README
Monthly Reminders
Set a recurring reminder on a specific day of the month. If the date falls on a weekend, the alarm (actually it's an email 😅) will go off on the next weekday (or the previous weekday if you choose so).
After installing you need to add an entry to your crontab that will execute monthly-reminder daily.
And to do that, we need to know the absolute path of monthly-reminder.
gt; which monthly-reminder
/usr/bin/monthly-reminder
gt; ls -l /usr/bin/monthly-reminder
lrwxrwxrwx 1 root root 56 Mar 22 10:48 /usr/bin/monthly-reminder -> ../lib/node_modules/monthly-reminder/monthly-reminder.js
Now we have all the information we need. Run crontab -e and schedule a daily job:
gt; crontab -e
# Make sure that you are setting the hour in your server's timezone.
# You can choose a different hour to receive the emails but the program must run daily.
0 9 * * * /usr/bin/monthly-reminder exec
Configuration
You need to create a config.json in the monthly-reminder directory. We found that directory in the previous step:
/usr/lib/node_modules/monthly-reminder
Let's change the directory:
gt; cd /usr/lib/node_modules/monthly-reminder
There is an example config that you can copy and derive. config.json content should be like this:
monthly-reminder uses Nodemailer to send emails. The nodemailer
object in the config is passed to createTransport of Nodemailer without modification. You may need additional
settings to send emails from your email provider. You can find all available configuration keys in Nodemailer
documentation.
Usage
All available commands are listed in the general help section:
Now the reminder is set. You will be reminded to pay your bills on 19th of each month (or the next business day where
19 is a weekend).
There are a couple of other settings and customizations that you can learn more about by visiting the help section.
gt; monthly-reminder add -h
Listing reminders
You can see a list of your reminders by running:
gt; monthly-reminder list
Deleting reminders
The command below will first list the reminders and then prompt you to choose which one(s) to
delete. You can delete multiple reminders by separating them with commas.