Hi Jyash,
I use scripts to build all of my cubes. There area alot of things you should consider, off the top of my head you should be mindful of:
1. What data does this cube need and where is it coming from ?
2. Where/who is this cube going to ? How am I going to distribute it ?
I have a number of cubes built overnight on a Windows platform using Cognos Macro scripts. These are invoked by Windows Scheduler. I also have a number of cubes built on a Unix platform. It simply depends on where the data is coming from and when it is available and where the cubes have to go once they are made.
A sample Windows script may look something like:
''''''''''''''''''''''''
' Macro to produce Cubes from Transformer Models
'
' Source: Cognos Macro Example
' Updated: 12/02/03
'
Declare Sub Build_a_cube(strModel_Path)
Declare Sub Move_a_cube(strSourceFilename,strTragetFilename)
Sub Main ()
Call Check_Drive("O:","\\Melvs02\Data2\Corp\Vwa"
Build_a_cube("N:\InfoServices\DWG\Cogapps\cubegen\Data Warehouse\Fieldlink\Transformer Models\fieldlink model.pyi"

Call Move_a_cube("c:\Temp\build\notices current.mdc","O:\Cognos\FieldLink\Cubes\notices current.mdc"

Call Move_a_cube("c:\Temp\build\fieldlink current.mdc","O:\Cognos\FieldLink\Cubes\fieldlink current.mdc"
Build_a_cube("N:\InfoServices\DWG\Cogapps\cubegen\Data Warehouse\Fieldlink\Transformer Models\activity model new.pyi"

Call Move_a_cube("c:\Temp\build\activity current.mdc","O:\Cognos\FieldLink\Cubes\Final Cubes\activity current.mdc"

End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Sub Build_a_cube(strModelPath)
Dim objTransApp As Object
Dim objModel As Object
On Error Goto ErrorHandler
Set objTransApp = CreateObject("CognosTransformer.Application.Cer3"

Set objModel = objTransApp.OpenModel(strModelPath)
With objModel
.CreateMDCFiles
.Update
.Close
End With
Goto ExitSub
objModel.Close
objTransApp.Close
Set objModel = Nothing
Set objTransApp = Nothing
ErrorHandler:
MsgBox "Error " & Err & ": " & Error$, 16, MacroName
Resume ExitSub
ExitSub:
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Sub Move_a_cube(strSourceFilename,strTargetFilename)
On Error Goto ErrorHandler
If Dir$(strSourceFilename) <> "" Then
If Dir$(strTargetFilename) <> "" Then
Kill strTargetFilename
End If
FileCopy strSourceFilename,strTargetFilename
Kill strSourceFilename
DoEvents
End If
Goto ExitSub
ErrorHandler:
MsgBox "Error " & Err & ": " & Error$, 16, MacroName
Resume ExitSub
ExitSub:
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''