Hi Figen,
I would recommend you to take a look at the following file ~/CMSAPIExamples/Code/Tools/Staging/Default.aspx.cs . In this file you can find API examples related to staging functionality. Also the following link to our documentation migh be helpful https://docs.kentico.com/display/K82/Scheduling+custom+tasks it shows how to schedule your custom tasks. Maybe if you could provide more details, what exactly you want to achieve we will be able to provide more detailed answer.
Best regards, Roman Konicek