PDA

View Full Version : [Zgemma H7] cron jobs not running



Willo3092
24-10-20, 19:49
I've noticed that my cron jobs aren't running but will work via ScriptRunner.
Can't find anything in debug logs but /var/log/messages has the following entries:

Oct 24 19:45:01 zgemmah7 cron.info crond[2195]: (readme.txt) ORPHAN (no passwd entry)
Oct 24 19:45:01 zgemmah7 cron.info crond[2195]: (root) BAD FILE MODE (/var/spool/cron/crontabs/root)
Oct 24 19:46:01 zgemmah7 cron.info crond[2195]: (readme.txt) ORPHAN (no passwd entry)
Oct 24 19:46:01 zgemmah7 cron.info crond[2195]: (root) BAD FILE MODE (/var/spool/cron/crontabs/root)
Oct 24 19:47:01 zgemmah7 cron.info crond[2195]: (readme.txt) ORPHAN (no passwd entry)
Oct 24 19:47:01 zgemmah7 cron.info crond[2195]: (root) BAD FILE MODE (/var/spool/cron/crontabs/root)
Oct 24 19:48:01 zgemmah7 cron.info crond[2195]: (readme.txt) ORPHAN (no passwd entry)
Oct 24 19:48:01 zgemmah7 cron.info crond[2195]: (root) BAD FILE MODE (/var/spool/cron/crontabs/root)

I'd set it to run every minute to test it.

Willo3092
24-10-20, 20:31
Sorry, it's 5.4.001, not 5.3.039

ccs
24-10-20, 21:22
I see the same, but the cronjob setup for ntp is working ok......


Oct 24 21:14:01 et10000 cron.info crond[646]: (readme.txt) ORPHAN (no passwd entry)
Oct 24 21:15:01 et10000 cron.info crond[646]: (readme.txt) ORPHAN (no passwd entry)
Oct 24 21:16:01 et10000 cron.info crond[646]: (readme.txt) ORPHAN (no passwd entry)
Oct 24 21:16:36 et10000 cron.info crontab[21093]: (root) LIST (root)
Oct 24 21:17:01 et10000 cron.info crond[646]: (readme.txt) ORPHAN (no passwd entry)
Oct 24 21:17:01 et10000 cron.info CROND[21141]: (root) CMD ( cd / && run-parts /etc/cron.hourly)
Oct 24 21:18:01 et10000 cron.info crond[646]: (readme.txt) ORPHAN (no passwd entry)
Oct 24 21:19:01 et10000 cron.info crond[646]: (readme.txt) ORPHAN (no passwd entry)
root@et10000:~#


Oct 24 18:30:01 et10000 cron.info CROND[4218]: (root) CMD (/usr/bin/ntpdate-sync silent)
Oct 24 18:30:07 et10000 daemon.notice ntpdate[4222]: adjust time server 178.62.18.76 offset -0.002628 sec
Oct 24 18:42:33 et10000 daemon.notice ntpdate[4605]: adjust time server 129.250.35.251 offset -0.003887 sec
Oct 24 19:12:42 et10000 daemon.notice ntpdate[7761]: adjust time server 213.251.52.107 offset -0.010235 sec
Oct 24 19:30:01 et10000 cron.info CROND[10187]: (root) CMD (/usr/bin/ntpdate-sync silent)
Oct 24 19:30:07 et10000 daemon.notice ntpdate[10191]: adjust time server 85.199.214.99 offset 0.003329 sec
Oct 24 20:30:01 et10000 cron.info CROND[17979]: (root) CMD (/usr/bin/ntpdate-sync silent)
Oct 24 20:33:53 et10000 daemon.notice ntpdate[18335]: adjust time server 85.199.214.99 offset -0.018937 sec
root@et10000:~#

Google suggests checking file permissions.

Willo3092
24-10-20, 23:42
Google suggests checking file permissions.

Google was actually my first port of call and I checked but the script permissions are set at 755 which should be okay I think :confused:

birdman
25-10-20, 02:15
Google was actually my first port of call and I checked but the script permissions are set at 755 which should be okay I think :confused:Try 700. I have a sneaking suspicion that they are meant to be usable only by the owner.

Willo3092
25-10-20, 10:33
No, still not working. Is it right that there is no mention of cron timers in the debug logs? /var/log/messages is the only place I can see any reference to them.
These are my root entries in /etc/cron/crontabs/, nothing seems to work apart from ntpdate-sync.
I've tried changing the script permissions but doesn't seem to have any effect.

30 * * * * /usr/bin/ntpdate-sync silent
02 00 * * * /usr/script/skyscraper.sh
*/15 * * * * /usr/script/skypicker.sh
* * * * * /usr/script/willo.sh

Oct 25 09:31:01 zgemmah7 cron.info crond[2133]: (readme.txt) ORPHAN (no passwd entry)
Oct 25 09:31:01 zgemmah7 cron.info crond[2133]: (root) BAD FILE MODE (/var/spool/cron/crontabs/root)

ccs
25-10-20, 10:48
... a post elsewhere suggests setting permissions to 600.

What's /usr/script set to?

dsayers
25-10-20, 11:14
... a post elsewhere suggests setting permissions to 600.

What's /usr/script set to?

0755 https://github.com/OpenViX/vix-core/blob/9977a72c151bc751c95db83c4da0c8bd1e017797/src/ScriptRunner.py#L35

Willo3092
25-10-20, 11:29
I've put the script in /usr/script/ and /usr/scripts/ but still doesn't work with permissions set as 755

dsayers
25-10-20, 11:41
Trying to test this but I haven't setup top picks yet.

I've ran scripts manually but when trying to add Cron timer via gui I get an error.


67758.2006> Traceback (most recent call last):
< 67758.2007> File "/usr/lib/enigma2/python/Components/ActionMap.py", line 57, in action
< 67758.2009> File "/usr/lib/enigma2/python/Screens/CronTimer.py", line 147, in addtocron
< 67758.2010> File "/usr/lib/enigma2/python/mytest.py", line 324, in openWithCallback
< 67758.2012> dlg = self.open(screen, *arguments, **kwargs)
< 67758.2012> File "/usr/lib/enigma2/python/mytest.py", line 334, in open
< 67758.2014> dlg = self.current_dialog = self.instantiateDialog(screen, *arguments, **kwargs)
< 67758.2015> File "/usr/lib/enigma2/python/mytest.py", line 271, in instantiateDialog
< 67758.2016> return self.doInstantiateDialog(screen, arguments, kwargs, self.desktop)
< 67758.2016> File "/usr/lib/enigma2/python/mytest.py", line 294, in doInstantiateDialog
< 67758.2023> dlg = screen(self, *arguments, **kwargs)
< 67758.2023> File "/usr/lib/enigma2/python/Screens/CronTimer.py", line 318, in __init__
< 67758.2025> AttributeError: 'CronTimersConfig' object has no attribute 'KeyText'
< 67758.2025> [ePyObject] (CallObject(<bound method ActionMap.action of <Components.ActionMap.ActionMap instance at 0xaf16ab98>>,('ColorActions', 'green')) failed

Using vix 5.4.001


Steps to reproduce error

Menu, timers, Cron Timers and press green to add

dsayers
25-10-20, 12:02
No, still not working. Is it right that there is no mention of cron timers in the debug logs? /var/log/messages is the only place I can see any reference to them.
These are my root entries in /etc/cron/crontabs/, nothing seems to work apart from ntpdate-sync.
I've tried changing the script permissions but doesn't seem to have any effect.

30 * * * * /usr/bin/ntpdate-sync silent
02 00 * * * /usr/script/skyscraper.sh
*/15 * * * * /usr/script/skypicker.sh
* * * * * /usr/script/willo.sh

Oct 25 09:31:01 zgemmah7 cron.info crond[2133]: (readme.txt) ORPHAN (no passwd entry)
Oct 25 09:31:01 zgemmah7 cron.info crond[2133]: (root) BAD FILE MODE (/var/spool/cron/crontabs/root)

Manually added toppicks and it worked on the half hour for me


0 9 * * * /usr/script/skyscraper.sh
*/30 * * * * /usr/script/skypicker.sh

Willo3092
25-10-20, 12:06
I just went into the cron timers screen and also got a crash:

< 4273.9163> 11:04:45.1634 [Screen] Showing screen 'CronTimers'.
< 4273.9640> 11:04:45.2110 [Console] finished: /usr/bin/opkg list_installed cronie
[MAIN] executing main
TuxTxt cache cleared
< 4273.9879> 11:04:45.2349 Traceback (most recent call last):
< 4273.9880> 11:04:45.2350 File "/usr/lib/enigma2/python/Components/Console.py", line 45, in finishedCB
< 4273.9883> 11:04:45.2354 File "/usr/lib/enigma2/python/Screens/CronTimer.py", line 65, in checkNetworkState
< 4273.9885> 11:04:45.2355 File "/usr/lib/enigma2/python/Screens/CronTimer.py", line 198, in updateList
< 4273.9887> 11:04:45.2357 IndexError: list index out of range
< 4273.9888> 11:04:45.2358 [ePyObject] (CallObject(<bound method EnigmaLogFatal.write of <bound method Process.__init__ of <bound method EnigmaLogDebug.write of <bound method ActionMap.action of <bound method boundFunction.__call__ of <bound method List.doSuspend of <bound method VolumeText.changed of <bound method CList.__call__ of <bound method Label.changed of <bound method Label.changed of <bound method Label.changed of <bound method Label.changed of <bound method Label.changed of <bound method CList.__call__ of <unbound method eLabel.eLabel_setText>>>>>>>>>>>>>>>,(0,)) failed)
< 4277.9593> 11:04:49.2063 [gRC] main thread is non-idle! display spinner!

dsayers
25-10-20, 12:18
I just went into the cron timers screen and also got a crash:

< 4273.9163> 11:04:45.1634 [Screen] Showing screen 'CronTimers'.
< 4273.9640> 11:04:45.2110 [Console] finished: /usr/bin/opkg list_installed cronie
[MAIN] executing main
TuxTxt cache cleared
< 4273.9879> 11:04:45.2349 Traceback (most recent call last):
< 4273.9880> 11:04:45.2350 File "/usr/lib/enigma2/python/Components/Console.py", line 45, in finishedCB
< 4273.9883> 11:04:45.2354 File "/usr/lib/enigma2/python/Screens/CronTimer.py", line 65, in checkNetworkState
< 4273.9885> 11:04:45.2355 File "/usr/lib/enigma2/python/Screens/CronTimer.py", line 198, in updateList
< 4273.9887> 11:04:45.2357 IndexError: list index out of range
< 4273.9888> 11:04:45.2358 [ePyObject] (CallObject(<bound method EnigmaLogFatal.write of <bound method Process.__init__ of <bound method EnigmaLogDebug.write of <bound method ActionMap.action of <bound method boundFunction.__call__ of <bound method List.doSuspend of <bound method VolumeText.changed of <bound method CList.__call__ of <bound method Label.changed of <bound method Label.changed of <bound method Label.changed of <bound method Label.changed of <bound method Label.changed of <bound method CList.__call__ of <unbound method eLabel.eLabel_setText>>>>>>>>>>>>>>>,(0,)) failed)
< 4277.9593> 11:04:49.2063 [gRC] main thread is non-idle! display spinner!

Is yours crashing when going into Cron Timers screen or trying to add Cron timer? Mine crashes when pressing green to add in Cron timer screen

Willo3092
25-10-20, 12:44
I'd already gone into the Cron Timers screen and manually added the script after first deleting it from /etc/cron/crontabs/root.
I'd set the script to run every minute (because I have no patience!).
It didn't run so I went back into Cron Timers screen and no cron jobs showing at all and then it crashed.

dsayers
25-10-20, 14:10
For my crash it looks like it's been fixed here https://github.com/OpenViX/enigma2/commit/7209a71d238e7b7cedcaad9b3a10e8044efbb408#diff-901fc6f46bff3aa61b1f1d823aac7ce64b1ff76af45171eae8 87ab5a72ecec4a maybe fixed in next update.


For the Cron timer it's working for me */30 * * * * /usr/script/skypicker.sh is running every 30 minutes

abu baniaz
25-10-20, 14:21
The green button crash i snot happening on latest Dev image (5.4.002.009). I have not tried the rest of report properly.

Willo3092
26-10-20, 16:18
Finally sorted this by changing the permissions of /var/spool/cron/crontabs/root to 644 but not entirely sure why this happened in the first place :confused:

OUTPUT FROM /var/log/messages

NOT WORKING:

Oct 26 14:50:01 zgemmah7 cron.info crond[2086]: (readme.txt) ORPHAN (no passwd entry)
Oct 26 14:50:01 zgemmah7 cron.info crond[2086]: (root) BAD FILE MODE (/var/spool/cron/crontabs/root)

CHANGED PERMISSIONS OF /var/spool/cron/crontabs/root to 644

WORKING:

Oct 26 14:58:01 zgemmah7 cron.info CROND[20427]: (root) CMD (/usr/script/skypicker.sh)
Oct 26 14:58:01 zgemmah7 user.info kernel: [14642.858020] skypicker.sh (20427): drop_caches: 1
Oct 26 14:58:01 zgemmah7 user.info kernel: [14642.870918] skypicker.sh (20427): drop_caches: 2
Oct 26 14:58:01 zgemmah7 user.info kernel: [14642.886911] skypicker.sh (20427): drop_caches: 3
Oct 26 14:58:01 zgemmah7 cron.info CROND[20426]: (root) CMDOUT (slyk-1080-r19)
Oct 26 14:58:01 zgemmah7 cron.info CROND[20426]: (root) CMDOUT ()
Oct 26 14:58:01 zgemmah7 cron.info CROND[20426]: (root) CMDOUT (Processing...Please Wait.)

ccs
26-10-20, 16:25
What were they before, cron checks there is no group/public rw access on cron files/directories to prevent unauthorised root access on systems with multiple userids.

Willo3092
26-10-20, 16:43
Open to all :D permissions were set at 777 for some reason

bmitie
07-11-20, 22:05
I dd everything as above and it still wont run automatically!! Any other ideas? Openatv 6.4 and slyk 1080 v2.13, and sly 1080 R19