Click here to Skip to main content
15,888,286 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi

I have created one console application to read file from share and put in to database.

Now i want this application should be in batch file. and this file run only once in a day.

Please help me how to make this application as batch and schedule as job? I am very new to batch and Visual basic scripts.

Is any registry i need to create for batch server?

schedule job done in .Vbs script. Why this is required. Please any one explain me the flow to do this..


Thanks in advance
Sheela K R

What I have tried:

Console Application to read file from share and insert data into database.

Further I need to create a batch file it has to run my console application. Before that it has to read the date of file created and todays date. it has to compare then exe file has to execute..
Posted
Updated 6-Feb-17 22:59pm
v2
Comments
dan!sh 3-Feb-17 3:18am    
Which database are you using?
sheelakr 3-Feb-17 7:57am    
MS SQL

1 solution

No, you don't need to access the registry: just execute the EXE file you will find in your project/release/bin folder when you build the Release version of your application.

Scheduling is a OS function: for Windows you would use the Task Scheduler (Windows)[^] and set it to run the app at a specific time each day.
 
Share this answer
 
Comments
sheelakr 3-Feb-17 3:52am    
I think Batch server is Linux it seems. In my Application they created .bat and .vbs files. in .Vbs they are reading registry of computer name. Even i need to do the same. or other approach also i can do?

If task scheduler runs in Linux also?
CPallini 3-Feb-17 4:29am    
Yes, it's called cron, see, for instance:
https://www.pantz.org/software/cron/croninfo.html
CPallini 3-Feb-17 4:29am    
5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900