Make use of a time-based scheduler Cron, which is available on Debian (as well as on other Unix-like operating systems). Quartz offers a seamless integration with Java applications. Scheduling a particular script (e.g. restarting server) can be easily done using Cron expressions in form of a string consisting of five or six fields (separated by white space), which are respectively responsible for: minutes, hours, day of month, month, day of week, year.
1) Implement a procedure to restart server (e.g. integrated in Java application or through system script).
2) Make use of Quartz to provide Cron functionality to Java application, in particular to make use of Cron expressions.
3) Provide an option for (privileged/administrator) users to manage Cron expression string for restarting server in web interface.
4) Explain in a short summary the principle of functioning of Cron expressions, providing examples of the most common usages.