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.

Scheduling a cron job in go script

Featured Replies

I'm trying to sync files from one directory on my cache drive to another directory on my cache drive.  The code I'm using in the go script is

echo "0 * * * * rsync -a /mnt/cache/apps/downloads/transmission/ /mnt/cache/apps/downloads/complete/tv" >> /var/spool/cron/crontabs/root

but it doesn't seem to work. From my understanding, this should run at the top of every hour.  A short while ago I rebooted the tower 15 minutes before the top of the hour just to make sure the script loaded and nothing happened when the time came.

 

When I try

rsync -a /mnt/cache/apps/downloads/transmission/ /mnt/cache/apps/downloads/complete/tv

through telnet, it works as expected but I just can't figure out how to make it work in the go script.

 

Here is my entire go script, there's no much in there though.

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
echo "0 * * * * rsync -a /mnt/cache/apps/downloads/transmission/ /mnt/cache/apps/downloads/complete/tv" >> /var/spool/cron/crontabs/root

 

Also, if I want to run this every five minutes, would this be the code? (I started testing with this code just so I could see if it would run without having to wait a whole hour)

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
echo "*/5 * * * * rsync -a /mnt/cache/apps/downloads/transmission/ /mnt/cache/apps/downloads/complete/tv" >> /var/spool/cron/crontabs/root

 

 

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.