0

Is there a way to specify which user should executed the spring cron job set up using @Scheduled(cron = xxx )

Book Of Zeus
  • 49,509
  • 18
  • 174
  • 171
Misha
  • 1
  • 1
  • 1
    Jobs are running in a background thread, so not running as any user, since no Spring `SecurityContext` has been established. – Andreas Feb 14 '19 at 20:28
  • Possible duplicate of [SecurityContext with default System authentication/user](https://stackoverflow.com/q/47078381/5221149) – Andreas Feb 14 '19 at 20:33
  • the job is failing to access a directory on the server, how can i fix the permissions? – Misha Feb 14 '19 at 20:33
  • Give the OS user that is running the Spring Boot *process* access to the directory. – Andreas Feb 14 '19 at 20:37
  • its owned by a different user, I can check.. Thanks. – Misha Feb 14 '19 at 20:46

0 Answers0