Use the QV Power Tools for that. Although they are unofficially supported, they have been developed by QlikTech engineers and will save lots of time doing that kind of tasks.
Note that you can allow dynamic assignment and fix the number of licenses to be assigned to each document and play with that. But those exe files in the Power Tools can be scheduled using Windows to modify an assignment.
Hope that helps.