Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Assist with easy cron job

Featured Replies

Hi there,

 

Can anyone assist in making an easy script that will run the following command every 2 months? I would also like it to log its output to a file and overwrite the file every 2 months so i can review it.

 

Command I want to run on the schedule:

 

btrfs filesystem defragment -r -v -clzo /mnt/btrfsprotect

 

Kind regards

P

  • 2 weeks later...
  • Author

In case anyone needs to know I used user scripts and made this script:

 

#!/bin/bash
date > /mnt/btrfsprotect/domains/Defrag.log
btrfs fi show /mnt/btrfsprotect >> /mnt/btrfsprotect/domains/Defrag.log
btrfs filesystem defragment -r -v -clzo /mnt/btrfsprotect/ >> /mnt/btrfsprotect/domains/Defrag.log
btrfs fi show /mnt/btrfsprotect >> /mnt/btrfsprotect/domains/Defrag.log
date >> /mnt/btrfsprotect/domains/Defrag.log

 

Works fine on a cron schedule just change schedule to custom and enter:

 

1 5 1 2,4,6,8,10,12 *

 

for the 2 months thing.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.