In this article we will be seeing how to schedule an item in SharePoint 2010. An
item can be scheduled so that item is visible on the site only between the
scheduled start date and end date. An item will be scheduled to be automatically
approved (Status-Approved) and to be unpublished (Status-Draft) on specified
Before scheduling the item go to the Library Settings => Add from existing site
columns => add the following columns.
site = new SPSite("http://serverName:1111/"))
web = site.RootWeb)
SPListItem listItem =
scheduledItem = null;
throw new System.ArgumentException
DateTime startDate =
4, 6, 22, 50, 00);
DateTime endDate =
4, 6, 22, 51, 00);
scheduledItem.StartDate = startDate;
scheduledItem.EndDate = endDate;
Once the item is scheduled you could see the approval Status as "Scheduled".
If the start date is earlier than the current date, the item is published
immediately and Approval Status will become "Approved". If not, it is scheduled
to publish at a future date.
If the end date is specified, the item is scheduled to unpublished and the
Approval Status will become "Draft "at a future date.