I am a beginner and want to learn the method to run python script in linux system so that an application can automatically execute a job. For example, I want my ubuntu to do the cron job with a script to play a mp3 file by vlc player at 9pm every night , 7 audio files are named as Monday.mp3, Tuesday.mp3, Wednesday.mp3, Thursday.mp3, Friday.mp3, Saturday.mp3, Sunday.mp3 and are put in a folder as 7_Songs. In the script I expext to be like that : check date_weekday,load vlc player, play Monday.mp3 on Monday, play Tuesday.mp3 on Tuesday .... play Sunday.mp3 on Sunday.

Is it possible ? Can you show me any similar script or material for reference so that I can learn to write the script ? When the method is learnt, I guess I can further use them on open sourse application to do automation job.

Thank you very much for your help and guidance.

Recommended Answers

All 2 Replies

You could try os.system(vlc 7_songs/Monday.mp3) , but I don't know if that's what you want, or even if that works that way.

thx Linux. I will try.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.