I do not have done this as never faced the scenario you have one now. I am sure this cannot be attained from SSMS because the generate script does not allow us to save this as SSIS package. If that would have been the case we would have saved it as SSIS package and would have called it using SQL Server agent. We now need to rely on powershell or some tool. Below are some links which can be helpful.
Automatic-Script-SQL-Server-2005-Objects-and-Commi
automatically-script-sql-server-table-data-and-object-schema-directly-to-source-control
how-can-i-automate-the-generate-scripts-task-in-sql-server-management-studio-2