# Database Discussions > MySQL >  What is the equivalent to 'exec master..xp_cmdshell c:\auto.vbs' in mysql.

## psn

I have created a table in mysql table.
The columns in that table are customername, customeremailid
and expirydate.

Expirydate is the date of expiration of customer account.

Example record are :
------------------------------------------------------
customername->David
customeremailid->david@hotmail.com
expirydate-> 31/08/2005 .
------------------------------------------------------
Now just 3 or 4 days before customer account expires an automatic email should go to my customer email account telling that "your account expires on certain date"

I shall write php code for this and use trigger.

But how to run this php code in background.

I know in ms sql the command is 'exec master..xp_cmdshell c:\auto.vbs'

where auto.vbs contain vbscript code  to send email.

1)What is the equivalent to this in mysql.
2)Can I use vbs to run php code code in background
3)Or Is it possible to directly send email to my customer from mysql without using phpcode.

Regards.

----------

