It would be nice to see an all schedule tasks in one place.
Power on/off, SMART tests, backup tasks also with user defined tasks (run shell cmds or scripts, sound beeps, lcd messages etc).
Thanks.
Schedule tasks
-
Vortex
- Posts: 13
- youtube meble na wymiar Warszawa
- Joined: Sat Aug 02, 2014 2:48 pm
-
damien599901
- Posts: 578
- Joined: Mon Dec 30, 2013 2:53 am
Re: Schedule tasks
+10000000
Storage: AS7004T & AS5002T
Network: FREEBOX REVOLUTION V6
Laptop: Apple MACBOOK Pro OS X El Capitan & Windows 10
Media Player: ASUSTOR NAS with Kodi 16 Beta & HD_Engine 1 (thanks Fathe_Mande)
Portable: iPhone 6S Plus, iPad Mini 2 & iPad Air
Network: FREEBOX REVOLUTION V6
Laptop: Apple MACBOOK Pro OS X El Capitan & Windows 10
Media Player: ASUSTOR NAS with Kodi 16 Beta & HD_Engine 1 (thanks Fathe_Mande)
Portable: iPhone 6S Plus, iPad Mini 2 & iPad Air
-
Elrique64
- Posts: 222
- Joined: Wed Feb 26, 2014 5:26 am
Re: Schedule tasks
I AGREE! It would have made life so much easier for me, having all of this in a single easy to get to spot. I had to learn some linux to make what I needed to do happen. Having one place to go to with several pre-configured tasks as well as customizable tasks available to edit this through the ADM would be GREAT! This is what I came up for now.
If you are familiar with apps like WinSCP or terminal to get into your NAS you can see most of these in the following file: /var/spool/cron/crontabs/root but the only way to get to it is through these kinds of sessions. Can't get to this file through File Manager... :/
This is where all of the time related or timed events are put and ran against a timer daemon called cron. They are called cronjobs (I guess) and is how you set up tasks that are done on either specific intervals or specific days of the week/month/year.
For instance:
*/5 * * * * /bin/touch -a /volume1/USB1/.dummy **** A keep alive to keep HDDs from spinning down every 5 minutes
30 1 * * 2 /usr/builtin/sbin/extbkagent "OwnCloud Backup" ***** Backup the owncloud folder on Tuesday at 1:30
50 0 * * 1 /usr/builtin/sbin/extbkagent "Photos" ***** Backup photo folder on Monday at 00:50
30 0 * * * /bin/sh /usr/builtin/sbin/ntpupdate.sh pool.ntp.org ***** Hit time server to adjust to atomic clock at 00:30
*/20 * * * * /etc/init.d/S56CkPlex ***** Check Plex is running every 20 minutes, restart as needed (Calls a script for this function)
As you can see, the cryptic beginning of these lines determines the time frame or criteria for execution. a "/#" means every x portions of the timing. These slots are defined as: minute (0-59), hour (0-23, 0 = midnight), day (1-31), month (1-12), weekday (0-6, 0 = Sunday). So something to happen every 2 hours is going to be like this:
* */2 * * * /task-to-do-goes-here. (Needs a script to work, or some other designated daemon)
A every other Tuesday, I assume would like like this:
* * * * */2 /task-to-do-every-other-Tuesday
Two of the tasks in the example above were created when I made the back up jobs in Backup & Restore app in the ADM. One is for setting time/date and made in Settings ->Regional Options. The other 2 I made myself and had a devil of a time doing it. The 5 minute one moreso than the Plex one. (I had to learn alot to make that first one, some of which I was able to apply to the second.) After you add something in to the file, you need to stop and start the timers... This is done through terminal and via these commands:
/etc/init.d/S41crond stop
/etc/init.d/S41crond start
If there were a Events app that looked at this file and made the appropriate edits, placing in the tasks, allowed you to start/stop the cron daemon would have made life alot easier.
Mike G.
If you are familiar with apps like WinSCP or terminal to get into your NAS you can see most of these in the following file: /var/spool/cron/crontabs/root but the only way to get to it is through these kinds of sessions. Can't get to this file through File Manager... :/
This is where all of the time related or timed events are put and ran against a timer daemon called cron. They are called cronjobs (I guess) and is how you set up tasks that are done on either specific intervals or specific days of the week/month/year.
For instance:
*/5 * * * * /bin/touch -a /volume1/USB1/.dummy **** A keep alive to keep HDDs from spinning down every 5 minutes
30 1 * * 2 /usr/builtin/sbin/extbkagent "OwnCloud Backup" ***** Backup the owncloud folder on Tuesday at 1:30
50 0 * * 1 /usr/builtin/sbin/extbkagent "Photos" ***** Backup photo folder on Monday at 00:50
30 0 * * * /bin/sh /usr/builtin/sbin/ntpupdate.sh pool.ntp.org ***** Hit time server to adjust to atomic clock at 00:30
*/20 * * * * /etc/init.d/S56CkPlex ***** Check Plex is running every 20 minutes, restart as needed (Calls a script for this function)
As you can see, the cryptic beginning of these lines determines the time frame or criteria for execution. a "/#" means every x portions of the timing. These slots are defined as: minute (0-59), hour (0-23, 0 = midnight), day (1-31), month (1-12), weekday (0-6, 0 = Sunday). So something to happen every 2 hours is going to be like this:
* */2 * * * /task-to-do-goes-here. (Needs a script to work, or some other designated daemon)
A every other Tuesday, I assume would like like this:
* * * * */2 /task-to-do-every-other-Tuesday
Two of the tasks in the example above were created when I made the back up jobs in Backup & Restore app in the ADM. One is for setting time/date and made in Settings ->Regional Options. The other 2 I made myself and had a devil of a time doing it. The 5 minute one moreso than the Plex one. (I had to learn alot to make that first one, some of which I was able to apply to the second.) After you add something in to the file, you need to stop and start the timers... This is done through terminal and via these commands:
/etc/init.d/S41crond stop
/etc/init.d/S41crond start
If there were a Events app that looked at this file and made the appropriate edits, placing in the tasks, allowed you to start/stop the cron daemon would have made life alot easier.
Mike G.
-
vesperdose
- Posts: 44
- Joined: Thu Feb 06, 2014 2:30 am
-
Auberon2k
- Posts: 213
- Joined: Sat Aug 31, 2013 12:47 am
Re: Schedule tasks
+100 if they can incorporate the Apps into the scheduling ie; 4PM - Start Mineraft_Server 10PM - Stop MineCraft_Server (No Minecraft until after school & homework kiddo!)
-
wyoung
- Posts: 30
- Joined: Tue Jul 08, 2014 8:53 pm
-
damien599901
- Posts: 578
- Joined: Mon Dec 30, 2013 2:53 am
Re: Schedule tasks
+1
Storage: AS7004T & AS5002T
Network: FREEBOX REVOLUTION V6
Laptop: Apple MACBOOK Pro OS X El Capitan & Windows 10
Media Player: ASUSTOR NAS with Kodi 16 Beta & HD_Engine 1 (thanks Fathe_Mande)
Portable: iPhone 6S Plus, iPad Mini 2 & iPad Air
Network: FREEBOX REVOLUTION V6
Laptop: Apple MACBOOK Pro OS X El Capitan & Windows 10
Media Player: ASUSTOR NAS with Kodi 16 Beta & HD_Engine 1 (thanks Fathe_Mande)
Portable: iPhone 6S Plus, iPad Mini 2 & iPad Air
-
mkp
- Posts: 10
- Joined: Thu Sep 18, 2014 7:18 pm
- Location: Amsterdam - if I'm not traveling :-)
Re: Schedule tasks
+1
It would also be very helpful to be able to have cron log what it's doing (and view that log).
I'm having a heck of a time getting cron to do anything at all, and have not been able to get it to log anything either, so I don't know if there are any error messages. That makes it pretty hard to debug.
I also suspect the busybox-provided cron is more limited than the regular one - but if so in what way? What syntax does it / does it not support? Knowing that would help in debugging as well.
It would also be very helpful to be able to have cron log what it's doing (and view that log).
I'm having a heck of a time getting cron to do anything at all, and have not been able to get it to log anything either, so I don't know if there are any error messages. That makes it pretty hard to debug.
I also suspect the busybox-provided cron is more limited than the regular one - but if so in what way? What syntax does it / does it not support? Knowing that would help in debugging as well.
AS-604T
4x WD Red 4TB in RAID 10
variable set of external USB HDs and USB flash drives (for syncing and backup)
4x WD Red 4TB in RAID 10
variable set of external USB HDs and USB flash drives (for syncing and backup)