473,326 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

i want to run this program at a specified date and time

3
Expand|Select|Wrap|Line Numbers
  1. import java.util.*;
  2. class Test2 extends TimerTask{    
  3.     public void run(){        System.out.println(System.currentTimeMillis());
  4.     }
  5. }
  6. public class Test {
  7.     public static void main(String args[]){                        Date date=new Date(2011,04,12,6,33,00);         
  8.         Timer timer=new Timer();
  9.     timer.schedule(new Test2(),date);
  10.     }
  11. }
// i want to run this program at a specified date and time
// How could i do it?
Apr 13 '11 #1
1 2770
Dheeraj Joshi
1,123 Expert 1GB
If you want to run your Java program at specified time, you may use operating system tools like cron.
Apr 13 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Adrian Parker | last post by:
Hi. I have a date time picker in my program which uses ADO to read from an Access database. It works perfectly, unless the database is empty (no records) when opened. When you try to open an...
7
by: Garyrek | last post by:
Hi I have a requirement where I need to make a report for each auto dealer how many hits they got on specified date range, so for each car detail page I increment the counter and total it while...
17
by: Lapchien | last post by:
My table has a record called date/time - filled (not surprisingly) with a date and time. I can format the date in one query field, also the time, using format in an expression. My user wants me...
3
by: gregmalenky | last post by:
Visual C# 2005 Express - I am creating a employee scheduling program for work. When I need to do is for the program to open with a start date of the previous sunday. I also want the ability to...
1
by: GMK | last post by:
I have a problme in the date time format, i'm building an asp.net application in this application i want to have the same date time format as it is in the windows regional seeting i want that the...
7
by: Jerome | last post by:
Hallo, I know a lot has already been told about date/time fields in a database but still confuses me, specif when dealing with SQLserver(Express). It seems that sqlserver only accepts the date in...
3
by: fong.yang | last post by:
I have a textbox on my form label date/time. I also added a date/time column to my table as well. The table already contains records before the date/time column was added. How do I setup a...
3
by: Darhl Thomason | last post by:
I'm building a database application that has a number of date fields in it. When I add the date/time picker control to my form and run it, if the field is null in my db, then it shows the current...
4
by: anupriya | last post by:
i am beginner of VB. i want to add date time picker tool in my form... how to do that.. is there any controls ... or we have to do through coding only... tell me the steps if so...
7
by: wanwan | last post by:
Hi, I'm looking for a better way to do a date/time elapsed event rather than a timer elapsed event. Currently, I wrote my program to use a timer elapsed event set to 1 second, and it checks...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.