|
#1
| |||
| |||
| cron alarm clock i have my crontab set up to wake me up every morning by playing a song in iTunes. the only problem is i have to manually set which song i want it to play every night. is there any way that i can get cron to randomly pick a file to play from a list i have generated, such as read a file and pick one? if so, could someone please fill me in on how to do this. thanks. |
|
#2
| ||||
| ||||
| Get thee to here: http://www.versiontracker.com/morein...d=13824&db=mac |
|
#3
| |||
| |||
| what do you have in crontab? open song.mp3? why don t you create a small applescript file that launches iTunes and starts playing at random, and put 'open applescript' in crontab |
|
#4
| ||||
| ||||
| also check versiontracker for "MP3 Alarm Clock". Nice little app, featureful and free.
__________________ What is the robbing of a bank compared to the founding of a bank? -- Bertold Brecht |
|
#5
| |||
| |||
| Or one line: Code: perl -e 'print "$ARGV[ int rand( scalar( @ARGV ) ) ]\n";' /path/to/mp3/* |
|
#6
| ||||
| ||||
| I'm confused, can some one help me out? Where does this code stuff go? I know the CLI fairly well but I don't know scripts very well. obviously I can't just enter "perl -e 'print "$ARGV[ int rand( scalar( @ARGV ) ) ]\n";' /path/to/mp3/*" into cronnix so how do I make it work? Sorry if this is overly easy but the thread kinda jumped in above my head.
__________________ 1 ghz pb w/ 768M RAM, 10.3.latest (usually). Yeah life is good. |
|
#7
| |||
| |||
| it goes in your... crontab file... type crontab -e (this will open you crontab file for editing) then, depending on what time you want it to go off, you set the time like so 0 7 * * * /Users/yourname/scriptsdir/alarm.pl Basically, you all the other stuff the other guys told you, would go into a script called alarm.pl, and the cron daemon will run it at 7am or whatever time you set it for. For more info on crontab do a man crontab... with that you should be able to figure out how to start stuff up at designated times. Hope this answers your question.
__________________ BSDimwit Titanium Powerbook 550 512MB ram |
|
#8
| ||||
| ||||
| Thanks I have used it just crontab -e before but I'm not entirely proficient in it so I use cronnix which does the same job, just cocoaized. And that part about alarm.pl is exactly what I wanted to know.
__________________ 1 ghz pb w/ 768M RAM, 10.3.latest (usually). Yeah life is good. |
![]() |
| Thread Tools | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [HOWTO] - Make iCal an alarm clock! | boi | HOWTO & FAQs | 16 | May 28th, 2005 01:53 PM |
| [HOWTO] - Use iTunes as an alarm clock | tieng | HOWTO & FAQs | 17 | January 21st, 2004 09:52 AM |
| cron alarm clock | iknownotwhoiam | Mac OS X System & Mac Software | 1 | May 12th, 2002 08:52 AM |
| menu bar clock / classic clock overlap | xegan | Mac OS X System & Mac Software | 4 | January 13th, 2002 09:46 PM |
| menu bar clock / classic clock overlap | xegan | Mac OS X System & Mac Software | 0 | January 9th, 2002 09:31 PM |