[ Cron_okm ] Time-based job scheduler
[ Cron_okm ] Time-based job scheduler
About : https://github.com/cronie-crond/cronie
Applicable models: x.64 series, ARMv8 series
Applicable TOS4: 4.1.27 or later versions
Applicable TOS5: 5.1.17 or later versions
App download: https://tmnascommunity.eu/download/cron_okm/
Module WebUI for additional settings can be accesses at
TOS4: http(s)://yournasip:port/modules/Cron_okm/www
TOS5: click on Support & Help from app description inside the App Center
How to manully install this app on TerraMaster application store?
About
This module implements a CRON daemon for use by administrators and other modules to periodically run jobs on the NAS. To simplify job management and to be more flexible this module uses a combination of CRON and Anacron to provide different ways to inject jobs.
Cron is a time-based job scheduler in Unix-like computer operating systems. Cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates. It is commonly used to automate system maintenance or administration, though its general-purpose nature means that it can be used for other purposes
Re: [ Cron_okm ][ 1.5.7.0 ] Time-based job scheduler
I have 2 x f2-221. One is only the destination for rsync so only needs to power on when rsync is scheduled to run. The problem I have is that the destination Nas scheduled power on and off doesn't work correctly since update to 4.2.14. could I create a cron job on the primary server to issue a wake on lan command to the rsync server and then after a set time issue a shut down command to the rsync server?
Re: [ Cron_okm ][ 1.5.7.0 ] Time-based job scheduler
Sure you can. Cronjob can be used to schedule any command/script you want.
For wake on lan, use the command
You can use this guide and adapt it to your needs and commands available on NAS
https://www.cyberciti.biz/faq/how-to-wa ... -in-linux/
For wake on lan, use the command
Code: Select all
[root@TNAS ~]# ether-wake MAC
BusyBox v1.27.2 (2018-04-03 18:05:42 CST) multi-call binary.
Usage: ether-wake [-b] [-i IFACE] [-p aa:bb:cc:dd[:ee:ff]/a.b.c.d] MAC
Send a magic packet to wake up sleeping machines.
MAC must be a station address (00:11:22:33:44:55) or
a hostname with a known 'ethers' entry.
-b Broadcast the packet
-i IFACE Interface to use (default eth0)
-p PASSWORD Append four or six byte PASSWORD to the packet
https://www.cyberciti.biz/faq/how-to-wa ... -in-linux/
Re: [ Cron_okm ][ 1.5.7.0 ] Time-based job scheduler
Hi
I've installed the app and shows up on the desktop but when I open the app or go to the URL (~/modules/Cron_okm/www) I just get: "(no access)"
I was logged in with my only user and that is an admin of course, I've tried rebooting and reinstalling but I'm just seeing (no access).
I'm running TOS 4.2.14
Any help would be appreciated.
Cheers
Nick
I've installed the app and shows up on the desktop but when I open the app or go to the URL (~/modules/Cron_okm/www) I just get: "(no access)"
I was logged in with my only user and that is an admin of course, I've tried rebooting and reinstalling but I'm just seeing (no access).
I'm running TOS 4.2.14
Any help would be appreciated.
Cheers
Nick
Re: [ Cron_okm ][ 1.5.7.0 ] Time-based job scheduler
download again the package and install it
-
- Posts: 74
- Joined: 04 Feb 2020, 05:00
Re: [ Cron_okm ][ 1.5.7.0 ] Time-based job scheduler
Downloaded the new package and working properly now - thanks!
Re: [ Cron_okm ][ 1.5.7.0 ] Time-based job scheduler
Just want to verify if I want to put this line in there, will it work?
The command above is to find files older than 20 days and delete it.
Where does this conf file be saved when you apply it.
Sorry for the n00b questions.
Code: Select all
0 0 * * * * root find ./mnt/md1/Temp -mtime +20 -type f -delete
Where does this conf file be saved when you apply it.
Sorry for the n00b questions.
Re: [ Cron_okm ][ 1.5.7.0 ] Time-based job scheduler
is there a possibility to get an arm version?
Re: [ Cron_okm ][ 1.5.7.0 ] Time-based job scheduler
if you edit the file via WebUI, it is saved in the general config located at /usr/local/Cron_okm/sys/etc/cron.d/0modulealvingo wrote: ↑31 Dec 2021, 14:33 Just want to verify if I want to put this line in there, will it work?
The command above is to find files older than 20 days and delete it.Code: Select all
0 0 * * * * root find ./mnt/md1/Temp -mtime +20 -type f -delete
Where does this conf file be saved when you apply it.
Sorry for the n00b questions.
The logs can be viewed in the messages file located at /var/log/messages and look for the lines with OKM_CROND
Code: Select all
Jan 2 20:40:01 TNAS-xxxx OKM_CROND[16252]: (www-data) CMD (/usr/local/bin/Nextcloud_okm cron.php)
Jan 2 20:40:06 TNAS-xxxx OKM_CROND[16251]: (www-data) CMDEND (/usr/local/bin/Nextcloud_okm cron.php)