I am currently working on a schedule application in Java (Netbeans) and basically, I want to have notifications pop up whenever something is close to being due. I would like them to pop up even when the application is not running. I don't think I'll need a database because all the times and due dates will be specified by the user. Also if it isn't possible to send notifications, is it possible to just automatically open a JFrame on a scheduled time? Thanks!
Related
I've GUI base JavaFX application. There are two buttons on it to perform specific functionality. One button used to send Inventory using HTTP Client to magento. I want to schedule this application on windows to run every 15mins. How to schedule it in way that when it runs, only 'Upload Inventory' button is clicked so that Inventory would be sent.
Scheduled tasks should run in the background and the most they should do on a UI is show a notification that "hey I'm active again". Certainly not show user windows (which is done typically to hand over control to the user) and then reclaim control from the user by automatically starting to click things on behalf of that user. Refactor your code to facilitate the function to run indepedently of the UI and schedule that.
What is the best way to implement a notification system that keeps running in the background?
This system will generate these notifications when certain conditions are met. The server has to monitor the database constantly for these events and update a notification log when they occur. When a notification is generated, an SMS is sent to designated people.
With a traditional JSP system, the code only runs when a user visits the site. How do you program the server to have the code running 24/7? Also, how do you feed back these events asynchronously to the front end so the front end does not need to keep polling the database?
The question is very vague, but i'd say you need a task scheduler, some application servers like wildfly already have a task scheduler, or you can use something like quartz, and set it to run every as many times as you need.
I've been pondering over this problem most the afternoon and haven't yet found the most ideal solution so thought I would see what others think..
There is a legacy Win16 application that has to be modified (with the least effort) in order to communicate with a web based application.
The idea is such that in the Win16 app, the user will want to look up a specific code, so they'll click a button which will then launch the browser and allow them to navigate a specific set of pages until they find the result they desire, then they have the option of either pressing Select or Cancel.
Pressing Select should pass back a small string back to the app (around 10 characters) and close the browser. Cancel will likewise send a Cancel message back to the app and again close the browser window.
I can't see many choices available in implementation as the Win16 app is not able to call webservices, so I'm looking at using the clipboard, however that is not without problems.
I hope there's some other alternative I haven't thought of,
As always - all advice appreciated.
Thanks,
I am currently building a java web app in netbeans. I have come to a point where I am stuck now. I have a draft application for a sports website I am building. The draft has the ability to have every user in the league access it, but I need it to be synchronized for all of them.
I want to run a java program or method that will create the draft at the specified date and time, then have centralized variables and a timer that each user can access when they access the web page.
So I want every user to see the same thing when they open the draft, regardless of what point in time they open it. Essentially this draft needs to run regardless of whether or not anyone actually opens it.
I am struggling with how I can do this, I was thinking threads, or a cron job, but I have no idea how to gain access to the program I run from my web app using something such as JSTL or jsp:useBean.
Any help at all would be much appreciated.
Since real-time consitency is important to your application.
One simple approach would be to store the draft information in database.
Set the sort order, start time and end time for all records in the database. Since you know this information before hand, you can do this from an admin script. Just run the admin script manually or at a preset time to update the database.
Now, clients can request the records that should be displayed given current time.
Added advantage with this procedure is that your client (JSP) can retrieve users in bunch with start time and end time and display them.
You don't have to make AJAX type of call every 20 seconds.
I'm developing a scheduling app, it reminds user of things to do during a day, it checks every minute to see if time is up, and if it is it will open an alert window to remind the user. Although it's written in Java, I'm targeting Windows users for this app. It needs to run as soon as users' PCs are turned on, so my question is: How to make a Java app automatically start when a PC is turned on in a Windows system?
I know I can go through a few steps manually to add the app to start-up apps list, but not every user is familiar with the steps, so I wonder if it can do this through my Java program, and if so is there any sample code?
create a .bat file
#javaw -jar path/to/jar/Name.jar arguments
drop this in you startup directory
Use Java Service Wrapper. Set wrapper.ntservice.starttype=DEMAND_START in wrapper configuration.