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.

Cannot figure out why my cron jobs are not running

Featured Replies

I have written a few ruby scripts that I want to run at certain times everyday. I cannot figure out why they do not run. Details:

 

I have created the directory /boot/config/plugins/mycrons ; within this directory I have a file called cronjobs.cron with the following instructions:

"

# Scheduled ruby delete at this time every day:
40 02 * * * /usr/bin/ruby /mnt/user/files/Ruby/delete.rb &> /dev/null

# Scheduled ruby delete1 at this time every day:
00 03 * * * /usr/bin/ruby /mnt/user/files/Ruby/delete1.rb &> /dev/null

# Scheduled ruby deleterar at this time every day:
20 03  * * * /usr/bin/ruby /mnt/user/files/Ruby/deleterar.rb &> /dev/null

 

"

When I run telnet command "cat /etc/cron.d/root" to view the current crons - the result is my above crons (along with the parity cron) - which had me confident that the crons would run at their scheduled times. But they did not. The error in my log is "Apr 23 02:40:01 Tower crond[1495]: exit status 1 from user root /usr/bin/ruby /mnt/user/files/Ruby/delete.rb &> /dev/null"

 

Any ideas on what I am doing wrong here?

 

Thanks in advance for any assistance.

The cron job did run but exited with an error on the first ruby script.

 

First, follow the suggestion of squid.

Second, do they run when the array is started, since "/mnt/user/..." is only available when the array is up.

 

  • Author
1 hour ago, Squid said:

does that command execute manually?

Squid - yes it does

  • Author
1 hour ago, bonienl said:

The cron job did run but exited with an error on the first ruby script.

 

First, follow the suggestion of squid.

Second, do they run when the array is started, since "/mnt/user/..." is only available when the array is up.

 

Yes the array was started was started when it ran and received the error.

You need to make sure your script exits with a code 0 (assuming there is no real error), otherwise the cron job will fail.

 

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.