Does it look like this:
using (SPSite site = new SPSite("http://serverName:1111/"))
{
using (SPWeb web = site.RootWeb)
{
SPList list=web.Lists["Doc Library"];
SPListItem listItem = list.GetItemById(1);
ScheduledItem scheduledItem = null;
if (ScheduledItem.IsScheduledItem(listItem))
{
scheduledItem = ScheduledItem.GetScheduledItem(listItem);
}
else
{
throw new System.ArgumentException
("SPListItem must support scheduling",
"listItem");
}
DateTime startDate = new DateTime(2011, 4, 6, 22, 50, 00);
DateTime endDate = new DateTime(2011, 4, 6, 22, 51, 00);
scheduledItem.StartDate = startDate;
scheduledItem.EndDate = endDate;
scheduledItem.ListItem.Update();
scheduledItem.Schedule();
}
}
Source from my bookmarks: http://www.c-sharpcorner.com/uploadfile/anavijai/programmatically-schedule-an-item-in-sharepoint-2010/
Perhaps if the link doesn't help can you provide more information, perhaps your code isn't quite right on the event receiver. Can you also post the error because afaik you are heading down the right path.