Schedule a Python script via batch on windows (using Anaconda)

I would be a bit careful in calling python directly through environment as one never knows if the internals for activate function has changed. I’m just using basic bat-script to help me out. SET log_file=%cd%\logfile.txt call C:\Anaconda3\Scripts\activate.bat cd \script_directory python script.py arg1 arg2 > %log_file% This script saves the log-file wherever the bat is run … Read more

Multiple Spring @Scheduled tasks simultaneously

You should use TaskScheduler for your purpose @Bean public ThreadPoolTaskScheduler threadPoolTaskScheduler() { ThreadPoolTaskScheduler threadPoolTaskScheduler = new ThreadPoolTaskScheduler(); threadPoolTaskScheduler.setPoolSize(THREADS_COUNT); return threadPoolTaskScheduler; } Where THREADS_COUNT – total count of tasks which should be executed in parallel. If I understand you correctly, you have only 2 jobs, so you need 2 threads

Quartz.NET vs Windows Scheduled Tasks. How different are they?

With Quartz.NET I could contrast some of the earlier points: Code to write – You can express your intent in .NET language, write unit tests and debug the logic Integration with event log, you have Common.Logging that allows to write even to db.. Robust and reliable too Even richer API It’s mostly a question about … Read more

Spawning threads in a JSF managed bean for scheduled tasks using a timer

Introduction As to spawning a thread from inside a JSF managed bean, it would only make sense if you want to be able to reference it in your views by #{managedBeanName} or in other managed beans by @ManagedProperty(“#{managedBeanName}”). You should only make sure that you implement @PreDestroy to ensure that all those threads are shut … Read more

Task scheduler cannot open batch file when set to run whether user is logged on or not

I have resolved this problem with help from a contractor who was doing some other work for my institution. In the properties window for the task, on the Action tab, when creating or editing the action that opens the batch file (in my case test.bat), there is the “Program/script:” field and there is also a … Read more