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.

"Weekly" parity check - not run [SOLVED]

Featured Replies

Hey guys, I added this to my GO file last week, taking the script Joe made for the monthly parity check and modifying to run weekly... Woke up this morning, and nada. Just wondering what I missed....

 

In my GO file I have:

 

/boot/weekly_parity_check.sh

 

Within this "weekly" file i have:

 

#!/bin/sh
crontab -l >/tmp/crontab
grep -q "/root/mdcmd check" /tmp/crontab 1>/dev/null 2>&1
if [ "$?" = "1" ]
then
    echo "# check parity every Sun at 1 am:" >>/tmp/crontab
    echo "0 2 * * Mon /root/mdcmd check NOCORRECT 1>/dev/null 2>&1" >>/tmp/crontab
    cp /tmp/crontab /var/spool/cron/crontabs/root-
    crontab /tmp/crontab
fi

 

All looks good to me. If I do a crontab -l on my console I get:

# check parity every Sun at 1 am:
0 2 * * Mon /root/mdcmd check NOCORRECT 1>/dev/null 2>&1

 

Yes, I know i have the wrong date and time in the title section. :)

 

Just wondering why nothing ran.

 

Thanks!

 

Hey guys, I added this to my GO file last week, taking the script Joe made for the monthly parity check and modifying to run weekly... Woke up this morning, and nada. Just wondering what I missed....

 

In my GO file I have:

 

/boot/weekly_parity_check.sh

 

Within this "weekly" file i have:

 

#!/bin/sh
crontab -l >/tmp/crontab
grep -q "/root/mdcmd check" /tmp/crontab 1>/dev/null 2>&1
if [ "$?" = "1" ]
then
    echo "# check parity every Sun at 1 am:" >>/tmp/crontab
    echo "0 2 * * Mon /root/mdcmd check NOCORRECT 1>/dev/null 2>&1" >>/tmp/crontab
    cp /tmp/crontab /var/spool/cron/crontabs/root-
    crontab /tmp/crontab
fi

 

All looks good to me. If I do a crontab -l on my console I get:

# check parity every Sun at 1 am:
0 2 * * Mon /root/mdcmd check NOCORRECT 1>/dev/null 2>&1

 

Yes, I know i have the wrong date and time in the title section. :)

 

Just wondering why nothing ran.

 

Thanks!

 

Probably because the date syntax is not understood.   

The day of the week is represent by a number from 0-6 (0=sunday)

perhaps try this:

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

  • Author

Ahh, thanks! I had done some research on dates and cron and thought for days of the week you could use that, at least the example I saw showed that. I will change it to run tonight and see if it work.

 

Shawn

 

  • Author

Modified the "Mon" to a "1" to test and worked like a charm!

 

Thanks!

Shawn

 

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.