Pschedule 1.1.6 - Task on time

Window managers, icon programs, widgets, etc.
Message
Author
jake_take
Posts: 16
Joined: Mon 09 Jun 2008, 06:11
Location: Japan

#31 Post by jake_take »

In Pschedule main window the tasks are shown in commands and time, so we must edit or delete by judging from commands and time. It may cause mistakes. If you want to see the task name in the main window, in stead of command-lines, you should enter the commands with "#" followed by task names. For example,

Code: Select all

gxine http://www.bbc.co.uk/worldservice/ram/live_infent.ram #BBC news
("BBC news" is the task name in this case)
And edit func_cron_to_human file as follows.
(line 22, the difinition of $COMMAND)

Code: Select all

COMMAND=`echo "$CRONCOMMAND" | cut -d " " -f 6- | cut -d "#" -f 2`
You will see the task name ("BBC news") in main window.
I hope the future version of Pschedule has a task-names entry in addition to the conventional command entry.

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

#32 Post by zigbert »

jake_take
Thanks for your input!!!!!!

I have to deal with this later. There are just so many balls in the air right now.


Sigmund

jake_take
Posts: 16
Joined: Mon 09 Jun 2008, 06:11
Location: Japan

Multiple crond

#33 Post by jake_take »

If you restart X in a session, you will find 2 "cronds" running. One is of before restarting X, and another is of after restarting. This bug is caused by the command line "crond" in /root/.xinitrc. To fix this, this part in /root/.xinitrc should be "killall -q crond; crond" and the line 24 in /usr/local/pschedule/pschedule should be modified as below.

echo "killall -q crond; crond" >> $HOME/.xinitrc

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

#34 Post by zigbert »

jake_take
I think we better make a cron-check-script in /root/Startup like the one in Pbackup.


Sigmund

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

#35 Post by zigbert »

Version 0.7
See main post

jake_take
has improved the general handling of tasks.
Many thanks for his effort.


Changelog
- Give each task a nr./name. (thanks to jake_take)
- Do not center windows on screen.
- The 'next run' entry in add-task-window is now visible.
- Bugfix: Delete only selected task if similar command. (thanks to jake_take)
- Bugfix: Avoid several instances of cron. (thanks to jake_take)
- Bugfix: Thursday failed in cron-builder-window.

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

#36 Post by zigbert »

Version 0.8
See main post

- start pschedule with predefined task from terminal. (thanks to mcewanw)

Pschedule -h for usage.

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

unable to pass embedded paths or filenames containing spaces

#37 Post by mcewanw »

Thank you for updating Pschedule.

Unfortunately, whilst now modifying precord to utilise the new facility, I have come across a small but critical error which prevents the passing of commands or tasknames which contain embedded quotes, and/or paths or filenames which contain spaces or multiple spaces of various lengths.

For example, I need to be able to pass a command such as:

Code: Select all

precord "rec '$DIR1FILE'"
where DIR1FILE contains a path/filename which may contain spaces or multiple connected spaces. In the Pschedule "Command" window, the result should of course end up being:

precord rec 'what the path filename is including any spacesand the surrounding quotes'

To fix the problem the following two small changes are required in func_new:

line 59:

Code: Select all

Change:

<entry><variable>TASK</variable><input>echo $TASK</input></entry>

to:

<entry><variable>TASK</variable><input>echo \"$TASK\"</input></entry>
line 63:

Code: Select all

Change:

   <entry><variable>TASKNAME</variable><input>echo $TASKNAME</input></entry>

to:

<entry><variable>TASKNAME</variable><input>echo \"$TASKNAME\"</input></entry>
github mcewanw

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

#38 Post by zigbert »

mcewanw
Fixed in 0.8-1
Thank you


Sigmund

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

#39 Post by disciple »

It would be nice if there was a button to enable/disable a task. I think this can be done just by commenting it with a # in the crontab, although making the gui handle the disabled tasks would be a bit more difficult :)
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#40 Post by smokey01 »

Zigbert is there any way to start a program like ffmpeg at a predetermined time then stop it at a later predetermined time.

I would like to use Pschedule with ffmpeg to record shows on TV.

I assume you would setup a second cron job but how do you reference the original terminal window and job?

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

Post Reply