Well it depends how you have programmed your application. We can view a couple of pitfalls, you can find on your way.
The first problem can happen in the database. Your application access the database, retrieve data from various tables and then start processing the data. But suddenly the application comes to a halt. Certain data seems to be inconsistent. What happened here?
What happened is, that you loaded your data from various tables without using transactions. The database is not able to provide read consistency and somebody else updated one of the tables.
Thus run the critical queries in one transaction, so your database can provide the consistency you need.
The second problem happens on filesystem level. While you save you save your xml file, another instance of the program is writing at the same time. This will corrupt the file, because two writers can make quite a mess.
While your use case doesn't point to this situation, it is still worth securing.
This is easily solvable by using file locking. A exclusive write lock will save this for you. Nobody can read the file and only you can write it. Or you have to wait on the other program.
The last thing you can do, is create a pidfile (process id file) for your program, but I don't think it is needed here.
So if you run a different instance, it can check another instance is running and then goes into a waiting mode until the pidfile is given free. You can lock the pidfile as above, but then with a shared lock. If your program hangs, then you can kill it easily by reading the pidfile and kill the process.
In pseudocode you do this:
As mentioned here log4net can't do concurrent writes to a single log file: