Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. I'm back with another #FreeBSD question, specifically about `periodic`.

I'm back with another #FreeBSD question, specifically about `periodic`.

Scheduled Pinned Locked Moved Uncategorized
freebsdcronperiodiczfs
5 Posts 3 Posters 0 Views
  • 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.
  • kedara@mastodon.bsd.cafeK This user is from outside of this forum
    kedara@mastodon.bsd.cafeK This user is from outside of this forum
    kedara@mastodon.bsd.cafe
    wrote last edited by
    #1

    I'm back with another #FreeBSD question, specifically about `periodic`. I'd like to use `periodic daily` to occasionally scrub my ZFS pools by setting `daily_scrub_zfs_enable` to `"YES"` in `/etc/periodic.conf`. This works great on a server, because it's always on, but not so great on my laptop, because the cron is scheduled at night. I could change the time, but then it'll only run if my laptop is on at the right time.

    Is there a way to schedule this so the `periodic` crons are run after booting, in case there are "missed" runs? What is the recommended approach here, use e.g. Xfce's autostart applications for this?

    Thanks for reading πŸ™‚

    #cron #periodic #zfs

    djfiander@code4lib.socialD ax6761@freeradical.zoneA 2 Replies Last reply
    1
    0
    • kedara@mastodon.bsd.cafeK kedara@mastodon.bsd.cafe

      I'm back with another #FreeBSD question, specifically about `periodic`. I'd like to use `periodic daily` to occasionally scrub my ZFS pools by setting `daily_scrub_zfs_enable` to `"YES"` in `/etc/periodic.conf`. This works great on a server, because it's always on, but not so great on my laptop, because the cron is scheduled at night. I could change the time, but then it'll only run if my laptop is on at the right time.

      Is there a way to schedule this so the `periodic` crons are run after booting, in case there are "missed" runs? What is the recommended approach here, use e.g. Xfce's autostart applications for this?

      Thanks for reading πŸ™‚

      #cron #periodic #zfs

      djfiander@code4lib.socialD This user is from outside of this forum
      djfiander@code4lib.socialD This user is from outside of this forum
      djfiander@code4lib.social
      wrote last edited by
      #2

      @kedara install the package "anacron" and configure it to run the periodic scripts instead of cron. It's been a long time since I set up my laptop like this, but the instructions are pretty straightforward, as I recall #freebsd

      kedara@mastodon.bsd.cafeK 1 Reply Last reply
      0
      • djfiander@code4lib.socialD djfiander@code4lib.social

        @kedara install the package "anacron" and configure it to run the periodic scripts instead of cron. It's been a long time since I set up my laptop like this, but the instructions are pretty straightforward, as I recall #freebsd

        kedara@mastodon.bsd.cafeK This user is from outside of this forum
        kedara@mastodon.bsd.cafeK This user is from outside of this forum
        kedara@mastodon.bsd.cafe
        wrote last edited by
        #3

        @djfiander I think this is exactly what I was looking for. Thanks a lot!

        1 Reply Last reply
        0
        • kedara@mastodon.bsd.cafeK kedara@mastodon.bsd.cafe

          I'm back with another #FreeBSD question, specifically about `periodic`. I'd like to use `periodic daily` to occasionally scrub my ZFS pools by setting `daily_scrub_zfs_enable` to `"YES"` in `/etc/periodic.conf`. This works great on a server, because it's always on, but not so great on my laptop, because the cron is scheduled at night. I could change the time, but then it'll only run if my laptop is on at the right time.

          Is there a way to schedule this so the `periodic` crons are run after booting, in case there are "missed" runs? What is the recommended approach here, use e.g. Xfce's autostart applications for this?

          Thanks for reading πŸ™‚

          #cron #periodic #zfs

          ax6761@freeradical.zoneA This user is from outside of this forum
          ax6761@freeradical.zoneA This user is from outside of this forum
          ax6761@freeradical.zone
          wrote last edited by
          #4

          @kedara Could directly run the actual ZFS scrub script on boot via "crontab(5)" ...

          @reboot -n sleep 134 && /etc/periodic/daily/800.scrub-zfs

          ... with "daily_scrub_zfs_enable"d (πŸ™„preferable would be to refactor the part for the "case" of "[Yy][Ee][Ss]" in its own script in order to not have to rely on extra moving part).

          kedara@mastodon.bsd.cafeK 1 Reply Last reply
          0
          • ax6761@freeradical.zoneA ax6761@freeradical.zone

            @kedara Could directly run the actual ZFS scrub script on boot via "crontab(5)" ...

            @reboot -n sleep 134 && /etc/periodic/daily/800.scrub-zfs

            ... with "daily_scrub_zfs_enable"d (πŸ™„preferable would be to refactor the part for the "case" of "[Yy][Ee][Ss]" in its own script in order to not have to rely on extra moving part).

            kedara@mastodon.bsd.cafeK This user is from outside of this forum
            kedara@mastodon.bsd.cafeK This user is from outside of this forum
            kedara@mastodon.bsd.cafe
            wrote last edited by
            #5

            @ax6761 thanks, I went with anacron: easy to setup, and now I can make full use of other periodic scripts.

            1 Reply Last reply
            0
            • stefano@mastodon.bsd.cafeS stefano@mastodon.bsd.cafe shared this topic
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups