I am encountering a problem that I think there is a simple solution for. I'm currently using WinSCP (set up for FTP) with a Linux server for hosting a web application.
I've created a JAR file (filename.jar
) that I can run manually in the WinSCP Console (java -jar filename.jar
). It runs queries in a MySQL database that modifies an existing table. Effectively, for my front-end (that queries from this table) to be updated, it needs to have filename.jar
file run twice daily.
I am wondering what the proper way to approach this is. Ideally, it would be done at 00:05 and 12:05 each day. If WinSCP can be configured to run filename.jar
specifically at these times, that would be perfect. However, if there's a way to run the .jar
continuously, I figure a while-loop verifying the desired system time within filename.jar
would work as well.
I've seen lots of information on doing this locally, but found little to nothing helpful on doing this for a server. Thanks for any help or ideas in advance, let me know if I can improve this question or provide more information. If there are any resources that explain this clearly a link to those would be greatly appreciated as well. I'm a new WinSCP user, if you can't tell already.