Jump to content


Photo

Crontab info or a Plugin Enigma2


  • Please log in to reply
72 replies to this topic

Re: Crontab info or a Plugin Enigma2 #61 Pr2

  • PLi® Contributor
  • 6,181 posts

+261
Excellent

Posted 19 August 2024 - 19:39

Normally in cron there is not path search, so I guess that you should put the full path to access awk too in your crontab command.


NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: Crontab info or a Plugin Enigma2 #62 WanWizard

  • PLi® Core member
  • 70,528 posts

+1,811
Excellent

Posted 19 August 2024 - 19:42

Yes, absolutely.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Crontab info or a Plugin Enigma2 #63 Qu@rk

  • Senior Member
  • 192 posts

+2
Neutral

Posted 19 August 2024 - 21:01

Thank you very much guys for your replies.

So the time must have already been set before the message log starts.

Why would there be the correct time after a deep standby?

 

I can only describe what's happening and post logfiles.

If you do not have time to read my posts completely I understand but there is nothing I can do about it. I am sorry.

 

I did a lot of research and testing before doing this.

 

As I mentioned several times, the command line in crontab works perfectly fine if the box is already running and the crontab entry was set to a time in the near future for example or to be executed every 15 minutes. It just doesn't work when the box awakes from deep standby by a timer event.

 

Is there a way to preserve the messages logfile between reboots or do I have to write my own script (init.d) for that to have a way to check what was happening at night?



Re: Crontab info or a Plugin Enigma2 #64 WanWizard

  • PLi® Core member
  • 70,528 posts

+1,811
Excellent

Posted 20 August 2024 - 09:38

If can only happen if the network was started, and the corresponding ntpdate fired, before syslog started. Unlikely, but possible.

 

You can preserve your logs by not storing them in volatile storage. The path is configured in /etc//syslog-startup.conf.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Crontab info or a Plugin Enigma2 #65 Qu@rk

  • Senior Member
  • 192 posts

+2
Neutral

Posted 20 August 2024 - 13:28

Thanks.

Well, I checked several times and my syslog "messages" always shows the correct time from line 1, even after several hours in deep standby.



Re: Crontab info or a Plugin Enigma2 #66 WanWizard

  • PLi® Core member
  • 70,528 posts

+1,811
Excellent

Posted 20 August 2024 - 20:08

You may have a very fast box with ditto ethernet negotiation speed.

 

But I'm still waiting for the answers to all other questions, as there is plenty wrong with your command ( like a missing path for awk ).

 

I'd start by scheduling something like

10 3 * * * echo "TEST" | ts '%Y-%m-%d %H:%M:%S >> /media/hdd/test.log

simple, without any dependencies, or other things that could go wrong with the command. And when that works, built it up.
 

Also note that unless you've installed the "full-fat" packages, you're working with busybox, which has only a small subset of options available on a desktop OS.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Crontab info or a Plugin Enigma2 #67 Qu@rk

  • Senior Member
  • 192 posts

+2
Neutral

Posted 21 August 2024 - 08:30

Thanks for your reply.

As mentioned several times and last in Post #63, the command line in my crontab works perfectly fine.

As I mentioned several times, the command line in crontab works perfectly fine if the box is already running and the crontab entry was set to a time in the near future for example or to be executed every 15 minutes. It just doesn't work when the box awakes from deep standby by a timer event.

Yes, I am working with busybox (standard OpenPLi 8.3) and I am aware that there are many limitations.

 

I did not know about the package "full-fat", interesting. But I don't want to change too much on my box. The more I deviate from standard OpenPLi the more complex testing and investigating becomes.

 

Btw, awk and tee work in crontab with or without the path to their location (/usr/bin).

 

I did not know the ts command. Makes things a bit easier. I use awk from time to time, very powerful, but for simple things it's a bit clumsy.

 

I have used tee because I was not sure if stdout is still needed for a cron log or something like that.

 

Thank you very much again for your useful hints.


Edited by Qu@rk, 21 August 2024 - 08:36.


Re: Crontab info or a Plugin Enigma2 #68 Qu@rk

  • Senior Member
  • 192 posts

+2
Neutral

Posted 21 August 2024 - 10:35


Also note that unless you've installed the "full-fat" packages, you're working with busybox, which has only a small subset of options available on a desktop OS.

 

I couldn't find anything about the "full-fat" packages. Please, could you point me in the right direction, link, docu etc. Thanks.
 



Re: Crontab info or a Plugin Enigma2 #69 s3n0

  • Senior Member
  • 673 posts

+62
Good

Posted 21 August 2024 - 12:04

Normally in cron there is not path search, so I guess that you should put the full path to access awk too in your crontab command.

Or let him create a shell script that runs in a regular Shell interpreter - as I suggested before. And there everything will work as it should work properly in Linux. The disadvantage is the need to create one more file (shell script) on the disk in the set-top box.

 

@Qu@rk:

 

Why do you actually need deep standby ? Why don't you use classic standby ? For what reason ? Is it some very important problem or why ?



Re: Crontab info or a Plugin Enigma2 #70 Qu@rk

  • Senior Member
  • 192 posts

+2
Neutral

Posted 21 August 2024 - 15:08

I was surprised too that tee and awk work in busybox crontab without a path.

I have tested both versions. But I have included the path in my recent version. It doesn't make a difference but you never know.

 

@s3n0

In Germany electric power is very expensive.

If you live in a country with very low energy prices or maybe money is no issue of course "normal" standby is more convenient.

I have used deep standby for more than a decade on my boxes and all these boxes have always worked perfectly fine without any issues.

 

Thank you all very much for your support and your time, very kind.

 

What are these "full-fat" packages? Couldn't find anything about it. Only the bash packages.


Edited by Qu@rk, 21 August 2024 - 15:10.


Re: Crontab info or a Plugin Enigma2 #71 WanWizard

  • PLi® Core member
  • 70,528 posts

+1,811
Excellent

Posted 21 August 2024 - 17:23

Not all tools have a "full-fat" equivalent in the feed (either because it doesn't exist, or we don't build it).

 

For awk for example, GNU awk is available in the feed, which has a lot more features that the crippled busybox version.

root@vuduo4k:~# opkg list | grep awk
gawk - 5.1.0-r0.1 - GNU awk text processing utility

Same for example for "bash" vs the cripped busybox ash shell:

root@vuduo4k:~# opkg list | grep bash
bash - 5.1-r0.1 - An sh-compatible command language interpreter

 


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Crontab info or a Plugin Enigma2 #72 Qu@rk

  • Senior Member
  • 192 posts

+2
Neutral

Posted 21 August 2024 - 17:42

Oh je, hihi, I was completely on the wrong track.

 

Thank you very much, that makes it much clearer.

From what I was able to research there is also a full featured cron package (cronie?).



Re: Crontab info or a Plugin Enigma2 #73 WanWizard

  • PLi® Core member
  • 70,528 posts

+1,811
Excellent

Posted 21 August 2024 - 17:43

From what I was able to research there is also a full featured cron package (cronie?).

 

Yes, it is default as of OpenPLi 9.0.

 


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users