Create a new Job in SQL Server Agent ( Open Enterprise Manager --> Your SQL Server --> Managment --> SQL Server Agent --> Jobs )
right click --> New Job...
Name : Set Coins
Go to Steps --> New -->
Step name : Set Coins 1
Type : TSQL
Database : cash
Command :
Code:
DELETE FROM character.dbo.user_character
WHERE character_name < ']'
AND character_name <> '[GM]Your Character Name'
AND character_name <> '[GM]Your Character Name'
If you need more GMs , you can add more lines with
Code:
AND character_name <> '[GM]Your Character Name'
Go to Advanced -->
On success / failure flow : "Goto the step next step
On failure action : "Goto the next step"
Press Apply ---> OK
Press again to New...
Step name : Set Coins 2
Type : TSQL
Database : cash
Command :
Code:
Must be the self code who you have used in Step 1
Go to Advanced -->
On success / failure flow : "Goto step : [1]Set Coins 1"
On failure action : "Goto step : [1] Set Coins 1"
Press Apply --> OK
Go to Schedules --> New Schedule... -->
Name : Start set Coins
Set -> Start automatically when SQL Server Agent starts
Press OK
Press OK again
Press Yes
Right click to the Job in the list and start Job.
Dont forget to add the automatically start service SQL Server Agent in SQL Status Menu in your Taskbar.