There could be many reasons why a Denodo Scheduler job can be stuck at “*RUNNING*” state while refreshing the cache. I suggest to do some preliminary checks to isolate the problem whether it’s in the Denodo Scheduler, in the Cache Database or in the Data Source:
1. Check the **Scheduler Administration logs**.
2. Do you have other Scheduler jobs dependent on this job? It’s possible that these dependent jobs are still running, therefore the parent job is still tagged as running. You can find more details about [job dependencies](https://community.denodo.com/docs/html/browse/8.0/en/scheduler/administration/creating_and_scheduling_jobs/configuring_new_jobs/dependencies_among_jobs) in this documentation.
3. Check the **Diagnostic & Monitoring Tool** and look for the currently running query.
4. Is the query running the INSERT query to update the cached data in your cache database? It’s possible that the performance of inserting cache data in the database is bad. I find it useful to check the [Virtual DataPort data source](https://community.denodo.com/docs/html/browse/8.0/en/scheduler/administration/creating_and_scheduling_jobs/data_sources/vdp_data_sources) connection parameters to improve the performance. This Knowledge Base article about using [batch size to optimize cache scheduler job performance](https://community.denodo.com/kb/en/view/document/Batch%20inserts%20in%20the%20cache%20and%20Scheduler) is also a good reference.
5. Is the query running the SELECT query to export data from the data source to cache? I suggest checking the data source connection parameters like timeout, chunk size, connection pool, etc. similar in point #4.
You can refer to this Knowledge base article about [Best Practices in optimizing performance in caching](https://community.denodo.com/kb/en/view/document/Best%20Practices%20to%20Maximize%20Performance%20III:%20Caching?category=Best%20Practices).
Hope this helps!