Tip: Scheduling miro in Linux (debian)
Hi just a quick scheduling tip using Cron, as it took me a while to get it working.
This allows you to start and stop miro at specified times of day using the in built Cron scheduler.
1, using an editor create a file called "start_miro.sh" in the ~/.miro directory.
In it place the following;
#!/bin/bash
export DISPLAY=:0
/usr/bin/miro %f
2, similarly create a file called miro_stop containing;
#!/bin/sh
ps axu | grep miro | grep -v grep | awk '{ print $2 }' | xargs kill -15
3, in a terminal type "crontab -e"
4, enter the following;
# Start Miro 1AM
5 1 * * * /home/debian64/.miro/mirostart.sh
# Stop Miro 6am
0 6 * * * /home/debian64/.miro/mirohalt.sh
NOTE it is easier to use Kcron if you are running KDE.
The above example is a script to start miro
one to stop miro cleanly ( although I arent too sure of this yet, so you may want to backup your sql file 1st, just incase).
the crontab above sets miro to start at 5 minutes past 1 AM and stop at 6AM every day
you can alter this,
the first number is minutes past the hour
the second the hour
the 3rd ( * here for all) is the day of the month
the 4th (* here for all) is the month
the 5th (* here for all) is the weekday
* matches all of whichever, be careful you dont use a value other than * for both weekday and day of the month.
Other options are available see man 5 crontab for info and how to change the editor used if you cant use the default.
This was done specifically for Debian, other distros may be slightly different but the man page should help if so.
Hope that helps........ jao
This allows you to start and stop miro at specified times of day using the in built Cron scheduler.
1, using an editor create a file called "start_miro.sh" in the ~/.miro directory.
In it place the following;
#!/bin/bash
export DISPLAY=:0
/usr/bin/miro %f
2, similarly create a file called miro_stop containing;
#!/bin/sh
ps axu | grep miro | grep -v grep | awk '{ print $2 }' | xargs kill -15
3, in a terminal type "crontab -e"
4, enter the following;
# Start Miro 1AM
5 1 * * * /home/debian64/.miro/mirostart.sh
# Stop Miro 6am
0 6 * * * /home/debian64/.miro/mirohalt.sh
NOTE it is easier to use Kcron if you are running KDE.
The above example is a script to start miro
one to stop miro cleanly ( although I arent too sure of this yet, so you may want to backup your sql file 1st, just incase).
the crontab above sets miro to start at 5 minutes past 1 AM and stop at 6AM every day
you can alter this,
the first number is minutes past the hour
the second the hour
the 3rd ( * here for all) is the day of the month
the 4th (* here for all) is the month
the 5th (* here for all) is the weekday
* matches all of whichever, be careful you dont use a value other than * for both weekday and day of the month.
Other options are available see man 5 crontab for info and how to change the editor used if you cant use the default.
This was done specifically for Debian, other distros may be slightly different but the man page should help if so.
Hope that helps........ jao
2
people have this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?I'd be hesitant to use the "stop" feature in cron because of the unpredictability of download speeds.
Also, the availability of new videos is sometimes delayed so ...
How about something that uses cron & wget or some such to first query for new videos & then download same for later viewing in Miro?
This would be leaner and meaner as it wouldn't need the whole program - now the question is where does miro keep the data you would need?
-- I'm looking at $HOME/.miro ....
I’m intrigued.
-
Inappropriate?Hi Wayne, thanks for the comment.
I made a point of using kill 15 hoping it would allow miro to exit gracefully.
Like many non-US users my bandwidth is limited except for 1AM to 6AM so it is neccesary to stop downloads at that time (while I'm sleeping).
I understand this abruptly stops any downloads but considered it no worse than disconnecting the internet connection which I did previously and still do when using Azureus ( it still sends and receives data after closing the ap down, but thats a different issue.).
***One thing I did fail to do was to tell people to ensure the start/stop scripts are executable. Easiest way to do this is to right click on them in a file manager, select properties and ensure the make executable checkbox has an X.***
Concerning your idea;
I thought the idea of Miro was to download videos for later viewing. I dont know much about wget, hence the reason for using things like Miro, Azureus et al.
There doesn't seem to be anything in the logs that give any pointers as to your idea although in ~/.miro/Movies there is a folder 'Incomplete Downloads' with items that were interupted. The data you would require would be in the sqlite database so you would have to query that.
If you don't want to use Miro to download then maybe a RSS program would lend itself better to your needs (Hey thats a thought! but not one I have time to follow up, sorry).
Maybe if Miro had an inbuilt scheduler things would be easier and cleaner, or maybe if there was a list of program options available on the command line we could pause downloads at a specific time instead of halting the program.
Also a way of stopping it from starting new downloads at say 5am would mean all downloads would hopefully be finished by 6am.
Well, thanks again for the feedback and ideas....
jaoweb
I’m thinking
Loading Profile...


