Pschedule 1.1.6 - Task on time

Window managers, icon programs, widgets, etc.
Message
Author
User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#41 Post by zigbert »

smokey01
This should kill ongoing ffmpeg processes

Code: Select all

kill -9 `ps | grep ffmpeg | awk '{print $1}'`

Sigmund

Frank Cox
Posts: 378
Joined: Sun 01 Nov 2009, 06:05

Ver 8 won't load

#42 Post by Frank Cox »

I loaded version .08 but it still says .07 even after a reboot.
I am running 431.
Also what would the command be if I wanted pschedule to play a song say in sda1/documents/my music/some-tune.mp3 ?

TIA

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#43 Post by disciple »

then stop it at a later predetermined time.
How about the -t option?

Code: Select all

~# ffmpeg -h|grep duration
...
-t duration         record or transcode "duration" seconds of audio/video
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

Re: Ver 8 won't load

#44 Post by zigbert »

Frank Cox wrote:I loaded version .08 but it still says .07 even after a reboot.
I am running 431.
Also what would the command be if I wanted pschedule to play a song say in sda1/documents/my music/some-tune.mp3 ?

TIA
So , you installed the Pshcehule pet in the main post, and it still shows version 0.7 ?

Code: Select all

# pschedule -v
Pschedule 0.8
To play a song you can use the builtin player. I don't remember if it is Aqualung or Pmusic. Aqualung "sda1/documents/my music/some-tune.mp3" should do the job.


Sigmund

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#45 Post by zigbert »

disciple wrote:
then stop it at a later predetermined time.
How about the -t option?

Code: Select all

~# ffmpeg -h|grep duration
...
-t duration         record or transcode "duration" seconds of audio/video
Pmusic has also the -t switch

Code: Select all

# pmusic --help
Usage: pmusic [OPTION(S)] [FILE(S) / DIR(S) / URL(S)]

Options
  -a          Add [FILE(S) / DIR(S) / URL(S)] to playlist instead of playing it
  -b          use Pmusic as backend - no GUI
  -c          Loads CD-audio disc into playlist and starts playing
  -h          Show this help message
  -p PRESET   Use This GUI-preset instead of the one defined in rc
              Available GUIs are stored in /usr/local/pmusic/presets/
  -r          Add/open directories recursively
  -s SIGNAL   Send signal to a running instance of Pmusic
                next    - Play next song in playlist
                mute    - Turn volume On/Off 
                pause   - Pause/Play audio
                prev    - Play previous song in playlist
                quit    - Quit all pmusic processes
                volup   - Increase volume level with 10%
                voldown - Decrease volume level with 10%
  -t xx:xx    Set the start time offset
              This does not work with the -a switch
  -v          Show Pmusic version
  
Supported formats (with working alsa and ffmpeg):
\.aiff|\.aac|\.ape|\.asf|\.au|\.flac|\.gsm|\.m4a|\.mp3|\.mp4|\.ogg|\.ra|\.raw|\.shn|\.voc|\.wav|\.wma

Frank Cox
Posts: 378
Joined: Sun 01 Nov 2009, 06:05

Re: Ver 8 won't load

#46 Post by Frank Cox »

TIA[/quote]So , you installed the Pshcehule pet in the main post, and it still shows version 0.7 ?

Code: Select all

# pschedule -v
Pschedule 0.8
To play a song you can use the builtin player. I don't remember if it is Aqualung or Pmusic. Aqualung "sda1/documents/my music/some-tune.mp3" should do the job.


Sigmund[/quote]

Yes , I installed the pet and when I open pschedule it still said .07 even after reboot. I will check it in terminal when I get back to that machine.
BTW Aqualung is the default but I want to run it with VLC. Do I need to make VLC the default?
Thanks

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

bug report-pschedule.8

#47 Post by don570 »

Bug report

There is a misspelt word. It should be Wednesday instead of Wedensday.

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

tip to record audio

#48 Post by don570 »

Here's a tip to record audio to a partition where you have lot of empty space.

I store potential commands in NoteCase program.

Code: Select all

cd /mnt/sda5 && arecord -d 5200 -f cd -D hw  out90.wav
cd /mnt/sda5 && arecord -d 3600 -f cd -D hw  out1.wav
cd /mnt/sda5 && arecord -d 7200 -f cd -D hw  out2.wav
cd /mnt/sda5 && arecord -d 10800 -f cd -D hw  out3.wav
cd /mnt/sda5 && arecord -d 14400 -f cd -D hw  out4.wav
cd /mnt/sda5 && arecord -d 20000 -f cd -D hw  out5.wav
cd /mnt/sda5 && arecord -d 21600 -f cd -D hw  out6.wav
The command sets the destination and then begins a recording
from 90 minutes to 6 hours.
I choose the line I need and paste it into pschedule.

I check that the schedule is correct with the terminal command

Code: Select all

crontab -l
to get a list of jobs to be performed.

Code: Select all

killall arecord
to kill the recording process (but wav file
that has been created will still remain).

After the recording is made , I change the name of the resulting file
so that I don't accidentally overwrite a previous recording in future
recordings.

________________________________________________________

Edit: The newest precord works with pschedule. See

http://murga-linux.com/puppy/viewtopic. ... 89&t=49907

_______________________________________________
Last edited by don570 on Tue 12 Oct 2010, 17:54, edited 4 times in total.

Frank Cox
Posts: 378
Joined: Sun 01 Nov 2009, 06:05

Pschedule

#49 Post by Frank Cox »

I finally got Pschedule to work but prefer the command line.

Type crontab -e and then hit control a to open the menu.

Type in the minutes hour etc.
No path to the program is needed. For instance I prefer vlc to aqualung so I type vlc /root/reminders/sometune.ogg

Then save as in the menu and exit.

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

Re: bug report-pschedule.8

#50 Post by zigbert »

don570 wrote:Bug report

There is a misspelt word. It should be Wednesday instead of Wedensday.
Got it

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#51 Post by zigbert »

Version 0.9
See main post

Changelog
- Free resizing of main window.
- Bugfix: Edit task adds another #
- Bugfix: Syntax error - Wedensday (thanks to don570)

User avatar
broomdodger
Posts: 279
Joined: Sat 10 May 2008, 02:38
Location: Santa Cruz, CA

#52 Post by broomdodger »

Pschedule 0.9
First time I have looked at Pschedule.
It looks great, similar to cronnix on the mac.
I have some crontabs already working.
Selecting one and clicked "Run", nothing happened!
But it works fine when triggered by crond.
Am I using "Run" wrong?
--ALSO--
Pschedule is not smart (yet?) about commented ("#") schedules, but I suppose that is on your todo list.
-Bill

User avatar
broomdodger
Posts: 279
Joined: Sat 10 May 2008, 02:38
Location: Santa Cruz, CA

#53 Post by broomdodger »

More info:
Quirky 1.3

0 13 * * * urxvt -g 64x9+0+0 -e vi /root/my-documents/note.txt

At 1pm each day open a console of size 64x9 with vi displaying the file note.txt

It works fine with crond, but from the "Run" button.

-Bill

User avatar
broomdodger
Posts: 279
Joined: Sat 10 May 2008, 02:38
Location: Santa Cruz, CA

pschedule more info

#54 Post by broomdodger »

This is a listing of my test crontab:

185119 ~# crontab -l
# /etc/init.d/start_cron
# /var/log/messages
# /var/spool/cron
# minute hour day month weekday command
# 43 1 12 2 4
# 43 1 12 Feb Thu
# * * 12 Feb *
# 0-59 0-23 1-31 1-12 0-7 0=7=Sun

0 13,21 * * * urxvt -g 64x9+0+0 -e vi /root/my-documents/note.txt
0 13,21 * * * urxvt -e vi /root/my-documents/note.txt
0 13,21 * * * /usr/bin/urxvt -e vi /root/my-documents/note.txt
0 13 * * * /usr/bin/urxvt -e vi /root/my-documents/note.txt
##*/2 * * * * urxvt -g 64x9+0+0 -e vi /root/my-documents/note.txt

185124 ~# pschedule

Message from first test:
0 13,21 * * * urxvt -g 64x9+0+0 -e vi /root/my-documents/note.txt
grep: invalid option -- 'g'
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.

Message from second test:
0 13,21 * * * urxvt -e vi /root/my-documents/note.txt
grep: 10:urxvt: No such file or directory
grep: /root/my-d...: No such file or directory

Message from third test:
0 13,21 * * * /usr/bin/urxvt -e vi /root/my-documents/note.txt
grep: 11:/usr/bin/urxvt: No such file or directory
grep: /...: No such file or directory

Message from fourth test:
0 13 * * * /usr/bin/urxvt -e vi /root/my-documents/note.txt
grep: 12:/usr/bin/urxvt: No such file or directory
grep: /...: No such file or directory

This time I selected the fourth item, only opened the edit panel, closed it and quit:
0 13 * * * /usr/bin/urxvt -e vi /root/my-documents/note.txt
185949 ~# pschedule
/usr/local/pschedule/func_human_to_cron: line 40: [: : integer expression expected

Of course, only one is active at a time, except for this manual test.
-Bill

User avatar
broomdodger
Posts: 279
Joined: Sat 10 May 2008, 02:38
Location: Santa Cruz, CA

#55 Post by broomdodger »

I edited the file (line numbers at the start of line):
/usr/local/pschedule/func_human_to_cron

39 if [ "$MINUTE" = "00" ]; then MINUTE="0"; fi
40 if [ "$MINUTE" \> "0" ] && [ "$MINUTE" \< "10" ]; then MINUTE=`echo "$MINUTE" | tr -d 0`; fi
41 if [ "$HOUR" = "00" ]; then HOUR="0"; fi
42 if [ "$HOUR" \> "0" ] && [ "$HOUR" \< "10" ]; then HOUR=`echo "$HOUR" | tr -d 0`; fi
43 DAY=`echo "$DAY" | tr -d .`

Tested with this:
02 13 * * * /usr/bin/urxvt -e vi /root/my-documents/note.txt

The "Edit" button did not leave an error message,
and parsed the string as: 2 13 * * *

User avatar
broomdodger
Posts: 279
Joined: Sat 10 May 2008, 02:38
Location: Santa Cruz, CA

"Run" now works for me

#56 Post by broomdodger »

Another guess, and the "Run" button now works.
Edit to line 2, adding quotes around $TREE (grep "$TREE")
Because there are spaces in the command string.

/usr/local/pschedule/func_run

1 #! /bin/bash
2 TREE=`cat /tmp/pschedule-treeitems | grep "$TREE" | cut -d "|" -f 3 | cut -c 2-` #jake_take

-Bill

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

verification of Broomdodger

#57 Post by don570 »

Code: Select all

urxvt -g 64x9+0+0 -e vi /root/my-documents/note.txt 
In lucid Puppy it didn't work when I clicked 'Run' button.

I'll try the fix.

Edit: Oops! It does work. I forgot to click on the command to
make sure it was highlighted. Then click on "Run' button.


________________________________________________________

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#58 Post by zigbert »

I have added the fix from broomdodger, and uploaded a new pet.
Thank you for helping!!!


Sigmund

User avatar
abushcrafter
Posts: 1418
Joined: Fri 30 Oct 2009, 16:57
Location: England
Contact:

#59 Post by abushcrafter »

zigbert wrote:I have added the fix from broomdodger, and uploaded a new pet.
Thank you for helping!!!


Sigmund
You need to fix/update the URL.
[url=http://www.adobe.com/flashplatform/]adobe flash is rubbish![/url]
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#60 Post by zigbert »

abushcrafter wrote:You need to fix/update the URL.
Done :)

Post Reply