Why not just do it with a shell script?
mv pl1 pl-1
mv pl2 pl1
mv pl pl2
mv pl-1 pl
Then have the cronjob run that script. It cuts out any problems that might arise from using PHP and keeps things simple.
If you don't know, a shell script is similar to a batch file on a windows box. Just copy all of that portion above into playlistShuffle.sh (or whatever you want to call it) and run it with "bash playlistShuffle.sh" (it's a good idea to use absolute paths very everything when using cron though, but that gives you the idea).
Check out Gordaen's Knowledge, the blog, and the MR2 page.