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.

cron not working as expected

Featured Replies

I described the issue here.

I don't believe that this is a "User Script" issue therefore I re-post here. "User Script" seems to correctly write the cron config files but Unraid does not seem to execute the jobs as expected.

Any ideas other than scheduling the backup weekly on Mondays and then check within the script if it's the first Monday of the month and exit if not?

Thank you.

Edited by Tom082

Solved by MAM59

  • Author

I found similar issues here and here

people sadly often forget, that UNRAID (and other Linux-based-distributions) are not "the real thing".

I mean, they come with all the standard commands like ls, cron, ntp and so on. But they often ship "crippled" versions.

So you cannot simply take a manual from somewhere and expect it to work everywhere.

(btw: I don't know if this is true for THIS cron, but there are so many limited commands, I would not be surprised).

And the Test string here was not very simple (took me some minutes to guess what it should do, still do not know if it makes sense at all).

"crippeled" maybe a bit harsch, often commands work "different" and support not all options from the other versions but sometimes even add a specific option.

This is because Linux is just a kernel and everything around it comes from different sources and different developers.

Does not mean that it is bad, just lower your expectations...

  • Author

Thanks @MAM59

How it works is explained here.

I understand that Unraid is fully runnig in RAM and therefore has some limitations. However from my point of view if a command is part of Unraid and uses the same name as the "real thing" then I would expect the same functionality.

How are users supposed to figure out differences? In my case there is no error message for parameters that are apparently not supported. I could also not find any Unraid specific cron documentation and Unraid comes without man pages. If there is documentation please let me know because I'm still a rookie when it comes to Unraid and Linux.

  • Solution
2 hours ago, Tom082 said:

hen I would expect the same functionality.

How are users supposed to figure out differences?

No way to tell, I just says that it is this way.

Thats why I usually make a big circle around this Linux stuff (the other disadvantage is that every distribution has its own idea WHERE a file should be and WHAT it does).

and stay with OSs like Free BSD or so. Here the file locations have not changed within 40 yrs and the included man pages really show what is working and how.

UNRAIDs limit have not much to do because it runs in RAM (can other too), it is just "where did it get it base commands from".

I still dont understand your reference and example. Looking for "monday" is faily simple to be done in every cron I know: the last "* is day of the week. Put a "1" here and you are fixed to mondays (in every locale).

Ok, 1st monday of a month... this can be a bit tricky.

I would be lazy and start a script every monday. At the beginning, I would then build up the environment (cronjobs run under their own and often very limited enviroment), and check if the day of week is <7. If not, exit script, done.

They tell you to do the check within the crontab already, this is a bad idea as I have pointed out. Very hard to debug which variables are available and which are not. Better start an own script, grab everything you need and then check. Especially "PATH" is not normal under cron, so take care which programs you are calling or set your own PATH.

Edited by MAM59

  • Author

I already started with updating my scripts to run on my chosen intervals...

Thanks!

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.