Question about cron package
-
I attempted to use crontab -e to setup a cron job, but pfSense complained and deleted it saying I should use the cron package instead.
So, okay, I installed the cron package and tried to configure a cron job.
I want a notification sent, like a MAILTO directive usually set up with unix cron jobs.
But if I put this in the Command box:
MAILTO=howard@sci1.com
/usr/local/binvnstat -mthe cron package concatenates it to
MAILTO=howard@sci1.com/usr/local/binvnstat -m
So how do I configure a cron job with notification?
-
pfSense isn't 'FreeBSD', pfSense is based upon FreeBSD.
And, if needed : FreeBSD isn't Linux neither.pfSense Documentation : noop, 'no mention of 'crontab'. No systemd neither
But, still, you can send mails, I'm doing it all the time.
Example : Auto update check, checks for updates to base system + packages and sends email alerts
If set up this script like this :
The script is written in PHP, but you can also use bash, sh, python, perl (I guess) etc.
Before pfSense can send mails, you have to set up : System > Advanced > Notifications first.
-
@Gertjan Thank you for the reply.
pfSense is already setup to send notifications.
So what do I do have the simple command "vmstat -m" run from cron and send an email?
-
@hspindel said in Question about cron package:
@Gertjan Thank you for the reply.
pfSense is already setup to send notifications.
So what do I do have the simple command "vmstat -m" run from cron and send an email?
Never mind. Figured it out. Thank you.