scheduled-tasks

Ruby win32ole - how to pass a VARIANT parameter?

本秂侑毒 提交于 2019-12-24 03:58:06
问题 I am trying to automate the Windows Task Scheduler using Ruby. I am using Ruby 1.8 under Windows Vista. The RegisterTaskDefintion method of the TaskFolder object takes two VARIANT parameters for the username and password. Any attempt to pass a string into these parameters results in a 'method_missing' exception: This does not work: rootFolder.RegisterTaskDefinition("Task", newTask, TASK_CREATE_OR_UPDATE, 'user', 'password', TASK_LOGON_PASSWORD, nil) This works: rootFolder

Regularly invoking an interactive process (WatiN tests) via Task Scheduler

荒凉一梦 提交于 2019-12-24 03:24:44
问题 I'm using a suite of WatiN tests driving IE to do some periodic sanity checking for the purposes of monitoring a site. The suite works fine when I invoke it interactively and/or when I configure the task in Task Scheduler to "Run only when the user is logged on". However, when I set it to "Run whether the user is logged on or not", and check the "Run with highest privileges" option (WatiN can't talk to the browser satisfactorily under Windows Server 2008 and many other OSes without having

How do I specify “Run with highest privileges” in VBScript?

我是研究僧i 提交于 2019-12-24 02:59:28
问题 When I use the GUI Task Scheduler, I can easily check the "Run with highest privileges" checkbox. I found no such option in the VBScript command line too, however. Is there a way to do that from the VBScript? How to add this script this two feature? Example VBScript: http://msdn.microsoft.com/en-us/library/aa383665%28v%3DVS.85%29.aspx Privileges: http://msdn.microsoft.com/en-us/library/windows/desktop/aa382076%28v=vs.85%29.aspx 回答1: This VBScript code automates the SchTasks.exe program and

EJB @Schedule issue

五迷三道 提交于 2019-12-24 02:42:08
问题 I need to schedule a task in my web application. The task needs to use a member field of the Servlet that is initialized during deployment. I have used the EJB @Schedule . However when the task is fired, the member field is null. I guess that the cause lies in the fact that I had to add the @Stateless annotation to the servlet in order to make the @Schedule work, and my Servlet needs to preserve its state indeed? If yes, how can I fire my task in a simple and efficace way? Using GlassFish 3

EJB @Schedule issue

时光怂恿深爱的人放手 提交于 2019-12-24 02:42:05
问题 I need to schedule a task in my web application. The task needs to use a member field of the Servlet that is initialized during deployment. I have used the EJB @Schedule . However when the task is fired, the member field is null. I guess that the cause lies in the fact that I had to add the @Stateless annotation to the servlet in order to make the @Schedule work, and my Servlet needs to preserve its state indeed? If yes, how can I fire my task in a simple and efficace way? Using GlassFish 3

Change current working directory from batch file and run script

感情迁移 提交于 2019-12-24 02:03:49
问题 In Windows 8: I have a php file which needs to be run from the scheduled tasks through .bat file. The PHP is located in: P:\php\php.exe The file to run is located in: W:\folder\file.php my .bat file looks like this: cmd /c p:\php\php.exe w:\folder\file.php It does not run. When I open cmd and switch to the file folder and run it from there, the file executes properly. i.e.: W:\folder> p:\php\php.exe w:\folder\file.php I have to add something to the .bat file which navigates to this w:\folder

@Scheduled Tasks keep JVM hanging when standalone program wants to exit, JVM needs to be killed

断了今生、忘了曾经 提交于 2019-12-24 01:46:10
问题 i opened this bug in the spring bug tracker. would be cool if some clever people here can already help me https://jira.springsource.org/browse/SPR-9341 回答1: Set "true" on daemon property for the scheduler - eg <!-- task scheduling for @Scheduled annotation --> <task:annotation-driven executor="myExecutor" scheduler="myScheduler"/> <task:executor id="myExecutor" pool-size="1" /> <bean id="myScheduler" class="org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler"> <property name=

Spark task duration difference

强颜欢笑 提交于 2019-12-24 01:33:30
问题 I'm running application that loads data (.csv) from s3 into DataFrames, and than register those Dataframes as temp tables. After that, I use SparkSQL to join those tables and finally write result into db. Issue that is currently bottleneck for me is that I feel tasks are not evenly split and i get no benefits or parallelization and multiple nodes inside cluster. More precisely, this is distribution of task duration in problematic stage task duration distribution Is there way for me to enforce

Can Pytest run at a pre-scheduled time?

橙三吉。 提交于 2019-12-24 01:01:49
问题 I am using pytest to run my tests using python3 script like below: pytest -s test_file.py | tee -a myoutput.log It works. Now I would like to run this at a specific time everyday, I tried "crontab -e" from linux console but failed. I mean there is no log added to "myoutput.log" file. Can anyone please help? thanks! 42 00 * * * /usr/bin/pytest pytest -s /data/smc/test_file.py | tee -a myoutput.log 回答1: I think it can be done by using cron output. eg: 42 00 * * * /usr/bin/pytest pytest -s /data

Dealing with DateTime and Timezones with Java / Postgres

孤街醉人 提交于 2019-12-23 23:25:08
问题 I am creating an application that let's a user create an event with a date. For example - Birthday, 25.09.2018. (The user is asked only for the date). I want to store these event objects in my Postgres DB. At the end of that date (it means at 23:59:59 on 25.09.2018) I want my application to set a flag on the event expired = true . My initial idea is to run a Scheduler every full hour, check the records for events and if the current server time is greater that the stored event time, set the