.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Customer Timer Job runs at different time

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :SharePoint

Hi All,

I have a custom timer job that I set to run at 8AM every day.(code below)

It does not run at 8AM instead it runs randomly during the day(but only once though)

How do I make sure that it runs at 8AM every day. Anything wrong in my code:

Thanks in advance.



override void FeatureActivated(SPFeatureReceiverProperties properties)



// register the the current web


View Complete Post

More Related Resource Links

Creating a timer job which runs only once at a specific time



I want to create a timer job which runs only once at the 'specified date and time'. How to create the job? Should i delete the job after it runs?

Visit SharePoint User group - India

Returning Customer Count of all categories in each time period



Lets say I have the following Table:

CustomerNumber | Date | MovieCategory
1 |2010-01-01|A
1 |2010-02-01|A
1 |2010-03-01|A
1 |2010-04-01|A
1 |2010-05-01|A
1 |2010-06-01|D
1 |2010-07-01|A
2 |2010-01-01|A
2 |2010-02-01|A
2 |2010-03-01|D
2 |2010-04-01|D
2 |2010-05-01|D
2 |2010-06-01|C
2 |2010-07-01|C
3 |2010-01-01|B
3 |2010-02-01|B
3 |2010-03-01|B
3 |2010-04-01|C
3 |2010-05-01|C

What I want to do is count the number of customers for each movie type in each date. Now I started with the following simple query

Select Date, MovieCategory, Count(CustomerNumber)
From AboveTable
Group By Date, MovieCategory
Order by Date, MovieCategory

which would be okay, but if no customer has a MovieCategory of say 'B' on a particular date then the results of the above query won't return a row that has

Date| B| 0     (date here could be any date).


which is really what I need. Is there a good way to

SSAS2005 Cube - Watch Customer on two points in Time



I need some help on the following problem:

I have got a customer status, let's say N for New, A for Active, I for Inaktive.

When a customer buys the first time his status will be N.
When he buys a second time his status changes to A.
After some time without an order his status is set to I.

This status changes are recorderd in a history table.

The question:

How many customers with status "N" at date(t1) and how many of those customers have status "N", "A" and "I" at date(t2).

e.g. on 01. Jan. 2010 i have 500 customers with status "N".
On 01. Jul. 2010 i want to know how many of those 500 customers from the 01. Jan. have status "A".
Let' say 200 have status A.

Output should be t1_U = 500 and t2_A = 200.

Would it be posible to do answer this question in a cube?
I have tried out some things but didn't get an plausible result.
With 2 messures (one for point1 in time, a second for point2 in time) it will not give me 200 in the second messure, but 220. I think a there is missing a relationship between the two messures on customer base.
So at point 2 there are 20 more customers with status "A" on point2 in time thats right, but they didn't exist on poi

SPListItem "Start Time" for recurring events when building a task reminder Timer job.


I have a timer job that looks at maintenance events (calendar list) planned 5 days in the future and moves them to the current todo list. It then marks that maintenance item as copied so it is not double copied to the current todo list.

This works good for single event maintenance items but not for routine or recurring maintenance items. The reason is the recurring events have a "start time" of the first event so after the first one gets moved the rest are all interpreted as being in the past, since (I think) the recurring events start time is generated as an offset of the original event at runtime. How would I get a collection of ALL the Event items that are 5 days out (single and recurring) within a timer job.




Expanded recurrence items cannot be updated

Login Audit Failure every time Agent runs


Hi everybody,


we're running several SQL-Servers 2008 (on Windows 2008 Servers). Every SQL-Server is using it's own domain accounts for running the services.

Every time a task is executed by an SQL-Agent, I find a Logon Audit Failure in the system log. The Details are listed below. The audit failure refers th the domain account fpr the SQL-Server Agent.



  - Provider
   [ Name]  Microsoft-Windows-Security-Auditing
   [ Guid]  {54849625-5478-4994-A5BA-3E3B0328C30D}
   EventID 4625
   Version 0
   Level 0
   Task 12544
   Opcode 0
   Keywords 0x8010000000000000
  - TimeCreated
   [ SystemTime]  2010-10-31T19:00:00.561331400Z
   EventRecordID 84856

  - Execution
   [ ProcessID]  604
   [ ThreadID]  13824
   Channel Security
   Computer myFullyQualifiedServerName


  SubjectUserSid S-1-5-21-693660846-2196240602-4257949084-21503
  SubjectUserName myServiceUserName
  SubjectDomainName MyDomainName<

Round off time to the nearest minute

How would you round this up to the nearest minute? There isn't a built in function to do this so you have to use a little bit of maths to get there. There are 60 seconds in a minute. We already have 38 seconds on the clock. So we need to add on 60 - 38 = 22 more seconds.

Performance Tests: Precise Run Time Measurements with System.Diagnostics.Stopwatch

Everybody who does performance optimization stumbles sooner or later over the Stopwatch class in the System.Diagnostics namespace. And everybody has noticed that the measurements of the same function on the same computer can differ 25% -30% in run time. This article shows how single threaded test programs must be designed to get an accuracy of 0.1% - 0.2% out of the Stopwatch class. With this accuracy, algorithms can be tested and compared.

Date and Time Functions in SQLSERVER

Date and time functions allow you to manipulate columns and variables with DATETIME and SMALLDATETIME data types.

1 DATEPART Function
2 DATENAME Function
3 DAY, MONTH, and YEAR Functions
5 DATEADD Functions
6 DATEDIFF Function
7 More SQL Server Functions

Data Types - Date and Time in SqlServer

Date and time values can be stored with either the DATETIME or SMALLDATETIME data type. The difference between the two is that SMALLDATETIME supports a smaller range of dates and does not give the same level of precision when accounting for time. The DATETIME data type can hold values from January 1st of 1753 to December 31st of 9999. The time is stored to the 1 three hundredths of a second and each value takes up 8 bytes of storage. The SMALLDATETIME data type can hold values between January 1st 1900 and June 6th of 2079. The time is tracked to the minute and each value takes up 4 bytes of storage. The majority of business applications can live happily with SMALLDATETIME, however, if you are in an environment where each second matters or you need to make estimates to the distant future (or past) then you have to resort to DATETIME. If you fail to specify the time when inserting a value into a DATETIME or SMALLDATETIME column, a default of midnight is used. If you fail to specify the date portion the default of January 1, 1900 is used.

How to programmatically add controls to Windows forms at run time by using Visual C#

Create a Windows Forms Application
Start Visual Studio .NET or Visual Studio 2005 or a later version, and create a new Visual C# Windows Application project named WinControls. Form1 is added to the project by default.
Double-click Form1 to create and view the Form1_Load event procedure.
Add private instance variables to the Form1 class to work with common Windows controls. The Form1 class starts as follows:

.NET 4 Web Application Startup Time

I was chatting with Jonathan Hawkins and some of the folks on the ASP.NET team about performance and Jonathan mentioned the startup time for large ASP.NET applications is improved on .NET 4. There are some improvements in the CLR and in ASP.NET itself that helped. If you have a giant app, you should do some tests.

Built-in Functions - Date and Time Functions

Date and time functions allow you to manipulate columns and variables with DATETIME and SMALLDATETIME data types.

Essential SQL Server Date, Time and DateTime Functions

The essential date and time functions that every SQL Server database should have to ensure that you can easily manipulate dates and times without the need for any formatting considerations at all.

Date/Time Conversions Using SQL Server

There are many instances when dates and times don't show up at your doorstep in the format you'd like it to be, nor does the output of a query fit the needs of the people viewing it. One option is to format the data in the application itself. Another option is to use the built-in functions SQL Server provides to format the date string for you.

Date and Time Data Types and Functions

The following sections in this topic provide an overview of all Transact-SQL date and time data types and functions. For information and examples that are common to date and time data types and functions

The Free Barcode Creator produces barcode images one at a time, and allows easy saving to a file or

The Free Barcode Creator produces barcode images one at a time, and allows easy saving to a file or pasting into an application. 2D versions are also available:

time zone


Hi all,
I have hosted a retail web application in Godaddy, how to pick particular country time in asp.net.
Thanks in advance.
J Walia

Hi all,

I have hosted a retail web application in Godaddy, how to pick particular country time in asp.net.

Thanks in advance.

J Walia

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend