Scheduling script execution in Eclipse - eclipse

Does Eclipse provide a way to schedule the execution of a Java script? (e.g., if I need to schedule a script at 6 am, every day...)
Thanks.

I'm not familiar with any built-in service. Nevertheless, Eclipse is written in Java, so there's no problem writing your own Java code for doing this. You can use the Timer class to schedule your code execution.
You "script" should be enclosed in an Eclipse plug-in. Use the Activator.start to schedule your process when the plugin loads.

Related

Why do we need OpenDDS run_test.pl?

I am running OpenDDS MPC based example stockQuoter. I deleted the run_test.pl, still the project builds and runs properly. why do we need this Perl script?
You don't really need it and you're free to start the programs directly. All examples and tests in OpenDDS have a file called run_test.pl for the purposes of testing. Among other functions, they define what programs get called with what arguments for a certain test scenario and are responsible for killing the programs if they get stuck.

Does powershell have the ability to run tasks?

Is there an equivalent to Powershell make? The equivalent of make/rake/cake/py-make, even Gulp...etc? I primarily desire a task runner for build automation. I want to be able to select and compose tasks like I can in Gulp.
Ideally, the solution would be native to Powershell. There are very tight security restrictions on software installations for the project. The power of Google has failed me.
nothing built-in, but there are different solutions like psake or invoke-build. maybe something else.
You can also use VScode for that, you can define tasks (basically run scripts or something) and run them on save or on check out, etc

Why does Eclipse CPU usage increase when I run an application?

I run my Java application in Eclipse and see these two thing in Task Manager:
Before I start my application, Eclipse uses ~0% CPU. What exactly does Eclipse do after my program started?
If I run my application without Eclipse, will there be any difference in my Java process CPU usage in the case that my JVM settings are the same with Eclipse?
Eclipse has to read your program output to display it in the console, for example, which can take a bit of resources, especially if your program generates lots of output and/or long lines of output (in my experience, the Eclipse console is quite slow). I suppose you're not running in debug mode, in which case Eclipse would have to do more to handle the debugging.
So your application running outside Eclipse may go a bit faster, yes.
You can of course run something like jvisualvm to get a thread dump of Eclipse while your program is running to find out exactly Eclipse is doing.

Automated build for MATLAB

Has anyone had success setting up automated builds for MATLAB code? We are manually compiling our MATLAB code into EXE's and distributing them to our servers. If anyone has found a good way to automate this, I'd love to hear it.
By "manually compiling" do you mean using mcc directly or are you already using deploytool?
Most build servers can automate the execution of a executable file. So simply use the build server to automate the build by calling the mcc.exe compiler and then handling its output...

What is the point of MSBUILD/NANT if you are just going to write procedural code? Isn't Powershell better?

I am currently writing a deployment script in MSBUILD, and after downloading several extensions, I have found myself looking at the build file and thinking:
What was the point in doing this in MSBUILD?
This deployment script is completely procedural: stop website, delete folder, copy files, change permissions, start website, etc. There is no fancy dependency stuff which I assume is the natural domain of tools like MSBUILD, NANT and MAKE.
The only reason I can see to use MSBUILD is that it comes as standard, and its easy to put the extensions into your SVN so builds 'just work'.
The problem with it is I have to spend all this time working out how to do 'basic stuff' in MSBUILD (locating extensions, working out syntax) which would be trivial (although more verbose) in Powershell or even command line.
So to sum up:
Are procedural tasks suited to MSBUILD or are you better of using something like Powershell?
Check out PSAKE and see what you think.
http://www.jameskovacs.com/blog/IntroducingPsake.aspx
http://powerscripting.wordpress.com/2009/01/25/episode-56-james-kovacs-talks-about-psake/
http://code.google.com/p/psake/
Experiment! Enjoy! Engage!
Jeffrey Snover [MSFT] Windows Management Partner Architect
MSBuild is not a scripting language and shouldn't be used as such. It's almost unfortunate that MSBuild has such a rich extensibility and is flexible enough to be used for just about anything. Use the tools that are most appropriate to the task, if you find yourself spending too much time creating functionality that is too limited and too low quality compared to what you'd be able to create with other technology, you should switch.
It really depends on your situation. If it were up to me, though, and you were using Visual Studio - I would say yes, stay with MSBuild for the sake of integration.
On the other hand, I would choose MSBUILD, as while the tasks are very procedural, it gives you the flexibility to extend this build process later on to handle more complex tasks.
msbuild comes with .NET. You have to add powershell to servers / users must add it - at least through Windows XP, server 2003. That may or may not be a problem in your environment.
I don't think procedural tasks are suited for writing in MSBUILD, simply because the shorter the msbuild, the better as far as I am concerned. I might use msbuild to call them, but would probably write an extension library to implement them.
I think it depends on how your release and deployment process flows, as to wither it makes sense to use an MSBuild extension or execute power-shell. MSBuild allows the flexiablity to handle all your process steps in one self contained execution flow.
If you need it to occur all at one time then MSBuild gives you control over the 'Events' or targets that can be overridden to meet your requirement.
If the requirement is deploy your artifacts after compiling your code then MSBuild is well suited to do this since you can use the 'AfterBuild' target that gets triggered during an MSBuild standard execution. It can make your process self contained.
Powershell cannot build your code. It would have to call MSBuild from within your script. To me it is a matter of having your build and deployment self-contained and therefore would be organized better.
MSBuild is the core Microsoft build platform and engine.