1

I have set up my Quartz.Net Windows service and it works just fine. I also have set up an AdoJobStore so that my jobs are stored in an Sqlite database file. This is my quartz.config part for Sqlite:

# SQLite settings
quartz.jobStore.type = Quartz.Impl.AdoJobStore.JobStoreTX, Quartz
quartz.jobStore.misfireThreshold = 60000
quartz.jobStore.lockHandler.type = Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz
quartz.jobStore.useProperties = true
quartz.jobStore.dataSource = default
quartz.jobStore.tablePrefix = qrtz_
quartz.jobStore.driverDelegateType = Quartz.Impl.AdoJobStore.SQLiteDelegate, Quartz
quartz.dataSource.default.provider = SQLite-10
quartz.dataSource.default.connectionString = Data Source=C:\Server\jobs.sqlite;Version=3

As you see in the connectionString value I have C:\Server\jobs.sqlite as the location of the database. Since my jobs.sqlite is always located in the Server folder, I want this setting to always read the file from the current directory i.e. same directory that my quartz.config is. How can I tell Quartz.Net to read from the current directory? Otherwise I have to change this value every time I move the folder.

disasterkid
  • 6,948
  • 25
  • 94
  • 179

1 Answers1

1

You can configure the SQLite connection string to be app relative, see the answer here:

App.config connection string relative path

Community
  • 1
  • 1
Marko Lahma
  • 6,586
  • 25
  • 29