ow to let windows server 008 automatically take actions frequently

I have a database with 1000 uer,
Each time a user login to the server, i add 1 to a counter field in the database.
I want if a user didnt logged in for 2 days to let the server send him and email automaticallly.

the sendmail.php and checklogin.php pages are ready.
I am using windows server 2008.
Any idea?
Who is Participating?
Manjunath SulladTechnical ConsultantCommented:

You need to create a schedule tasks to perform this task,

If you want to export user list, who not logged in for days, Please refer below link and implement,


Script : http://gallery.technet.microsoft.com/scriptcenter/Inactive-Users-Script-76eb43f4

Once you have user list, create a SMTP server and import user list and trigger a mail.
hassanayoub85Author Commented:
dear, the users are not in the windows itself, but they are in mysql table.
MySQL has init-connect, which you can use to cause any login by a non-SUPER user to update a table.


Perhaps something like:

init_connect='UPDATE mydb.userCount SET count = count + 1 WHERE userName = CURRENT_USER()'

Then use a scheduled task to run a script to check that table and send the email.
hassanayoub85Author Commented:
I found the solution myself
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.