You can construct an SSIS package from Management Studio to accomplish your goal; remember to schedule the associated Agent Job.
To save time and system resources you may want to start w/ a Reorganize Index task in your package instead of Rebuild Index.