Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Question about cron package

    Scheduled Pinned Locked Moved pfSense Packages
    4 Posts 2 Posters 820 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hspindel
      last edited by

      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 -m

      the cron package concatenates it to

      MAILTO=howard@sci1.com/usr/local/binvnstat -m

      So how do I configure a cron job with notification?

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan @hspindel
        last edited by

        @hspindel

        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 :

        f2bcd12f-7ca9-482d-8019-f54e2e94cd34-image.png

        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.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        H 1 Reply Last reply Reply Quote 0
        • H
          hspindel @Gertjan
          last edited by

          @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?

          H 1 Reply Last reply Reply Quote 0
          • H
            hspindel @hspindel
            last edited by

            @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.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.