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.

Change cron.daily time using script

Featured Replies

I want to make the cron.daily jobs run at 00:00 in stead of the default 4:40, because i am starting a script at that time that fetches subtitles for tv shows, like a backlog system. If i run it at 4:40, it has to spin up drives etc, while at 00:00 chances are that the drives are still up and running.

 

Now i know how to edit the cron file by hand to change the time, but i would like to do this on boot/startup, automatically, using a (python) script or even a cmd line from within to go script. Anyone has an idea on how to do this?

Python is (I assume, never learnt it myself) pretty easy to learn.

 

You'd want to combine something like this:-

http://snipplr.com/view/6630/

 

With regex, so, it'd go down the file (No idea where it's located, so, I can't give you the exact regex to modify it) and modify only the line you want.

  • Author

I'm no stanger to programming, and i'm pretty familiar with python, but i was hoping there would be a "nicer" way of changing it besides just open the file and read/write it ;) but hey why not.

 

Its even easier to just make an adapted copy, and copy that over the current cron table on startup... but it's not very sophisticated ;)

 

*edit* found a nice module, gonna check it out: https://pypi.python.org/pypi/python-crontab/

I'm no stanger to programming, and i'm pretty familiar with python, but i was hoping there would be a "nicer" way of changing it besides just open the file and read/write it ;) but hey why not.

 

Its even easier to just make an adapted copy, and copy that over the current cron table on startup... but it's not very sophisticated ;)

 

*edit* found a nice module, gonna check it out: https://pypi.python.org/pypi/python-crontab/

 

If the file never changes, can't you just do (In your go script):-

 

cp /lo/ca/ti/on/backUpOfCronTab /newLocation/crontab

 

?

  • Author

Yeah, just copy an allready adapted one, like i said before.

But i've got the python module running, it does a nice job as well, could come in handy in the future.

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.