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.

How do I tell Unraid to skip the parity check script that will run on Feb 1st

Featured Replies

I have a monthly parity check scheduled to run on the first of every month.

How can I tell unraid to skip the check on Feb 1st but still run the others?

Thx

 

Don't install to script until after  Feb 1.

  • Author

In my go script it runs a script that contains this:

 

#!/bin/sh

crontab -l >/tmp/crontab

grep -q "/root/mdcmd check" /tmp/crontab 1>/dev/null 2>&1

if [ "$?" = "1" ]

then

    echo "# check parity on the first of every month at midnight:" >>/tmp/crontab

    echo "0 0 1 * * /root/mdcmd check 1>/dev/null 2>&1" >>/tmp/crontab

    cp /tmp/crontab /var/spool/cron/crontabs/root-

    crontab /tmp/crontab

fi

 

I want to disable this from running on Feb 1st.

How do I do this without restarting unraid and commenting out the line in the go script?

 

At the shell prompt type crontab -e

Then comment out the command.

After feb 1 uncoment out that line.

There are other ways to do this but thats likely the most simple.

 

Sent from my SGH-I727R using Tapatalk

  • Author

Thank you. That will work great.

 

In my go script it runs a script that contains this:

 

#!/bin/sh

crontab -l >/tmp/crontab

grep -q "/root/mdcmd check" /tmp/crontab 1>/dev/null 2>&1

if [ "$?" = "1" ]

then

    echo "# check parity on the first of every month at midnight:" >>/tmp/crontab

    echo "0 0 1 * * /root/mdcmd check 1>/dev/null 2>&1" >>/tmp/crontab

    cp /tmp/crontab /var/spool/cron/crontabs/root-

    crontab /tmp/crontab

fi

 

I want to disable this from running on Feb 1st.

How do I do this without restarting unraid and commenting out the line in the go script?

 

Enter this command on the command line to get it to skip Feb 1st, but still do all the other months..

crontab -l | sed "sX^0 0 1 \* \* /root/mdcmdX0 0 1 1,3-12 * /root/mdcmdX" | crontab -

 

It will change the line in crontab from

0 0 1 * * /root/mdcmd check NOCORRECT 1>/dev/null 2>&1

to

0 0 1 1,3-12 * /root/mdcmd check NOCORRECT 1>/dev/null 2>&1

 

enter this to put it back so it does every month once more:

crontab -l | sed "sX^0 0 1 1,3-12 \* /root/mdcmdX0 0 1 * * /root/mdcmdX" | crontab -

  • Author

Thanks Joe :)

Archived

This topic is now archived and is closed to further replies.

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.