LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-11-2017, 01:39 AM   #16
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364

IF what you want is just: 'it' to 'exit' in 30minutes, try this ([cron] concept):
sleep 1800; pkill omxplayer

It'd probably be worthwhile for you to spend #minutes researching PID=ProcessID.
( -I- had MYkindOfFUN playing ##minutes with this: )
Code:
user@ubuntu:~$ sh -c "sleep 3601&pstree -p $$;exec pkill sleep";pgrep -l sleep
bash(940)───sh(1141)─┬─pstree(1143)
                     └─sleep(1142)
user@ubuntu:~$
user@ubuntu:~$ sleep 3601& pstree -p $$; pkill sleep
[1] 1197
bash(940)─┬─pstree(1198)
          └─sleep(1197)
[1]+  Terminated              sleep 3601 
user@ubuntu:~$ pgrep sleep; echo $? #ERRNO of 1 indicates: not found.
1
user@ubuntu:~$ sh -c "echo $$;echo \$\$" #TMI:$0&kill -9 1 LoL
Second line simpler (also can omit pstree info cmd).
(Oh, the semi-confusing concept HERE is: *this sleep* simulates your omxplayer!)

Enjoy! (You're doing GREAT learning Linux!)

p.s. More tl;DR links pstree, ps, AdvancedBash 1012page.pdf, and ...

Last edited by Jjanel; 03-11-2017 at 02:43 AM.
 
Old 03-11-2017, 11:39 AM   #17
halek37
LQ Newbie
 
Registered: Mar 2017
Location: Loudon TN
Distribution: Debian
Posts: 24

Original Poster
Rep: Reputation: Disabled
As I had mentioned I have posted a new thread "Play Video on Raspberry Pi"
on the Linux-Newby forum.

Again, thanks to all who helped me here!!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
automatic crontab backup of crontab brcjacks Linux - General 4 10-19-2015 03:21 AM
[SOLVED] crontab does not reread the crontab file upon modification of the latter. stf92 Slackware 4 08-01-2015 06:12 PM
[SOLVED] Problem with crontab:: command not executed properly via crontab Ankush Seth Linux - Newbie 11 11-11-2013 06:25 AM
DIff B/w Crontab -l & crontab -e Tareq9959 Linux - Newbie 2 05-14-2013 08:27 AM
[SOLVED] Threaded function cannot call a function with extern "C" but nonthreaded function can morty346 Programming 16 01-12-2010 05:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration