The restrictions mentioned in comments do not apply to your use case, they are for add-ons only. The right info is here.
But even if you actually can create a timer trigger to run a function every minute you can not use the method you try because a timer trigger can't interact with the Ui.
If you look at the error notification you'll see that message :
Details:
Start Function Error Message Trigger End
7/3/15 4:08 PM consolius Cannot call SpreadsheetApp.getUi() from this context. (line 26, file "clean sheet") time-based 7/3/15 4:08 PM
Another point of interest : you should include the script that creates the trigger in a function otherwise you will create a new trigger every time you run ANY other function in that project, including the function that the triggers calls, this will rapidly become quite messy ! (everything that is "global" is executed each time any function is called).
Last but not least : you can't use such code in a custom function, it has to be in a script you run from a menu or a button.
Time-driven triggers cannot run more frequently than once per hour.when I do this ScriptApp.newTrigger("consolius").timeBased().everyMinutes(1).create();`, so I cant do this? but exists method for run code every minute?