FAQ Database Discussion Community


Schedule to run a executable jar file on windows 7

jar,windows-7,scheduled-tasks
I created a task in task scheduler on Windows 7 system and made it repeatable every 10 minutes. In program, i selected the executable java jar file. But it does not run the jar file at the scheduled time. When i double click and run the jar file, it runs...

Automate MySQL backup @localhost with mysqldump in Windows 8

mysql,windows,operating-system,scheduled-tasks,mysqldump
I'm trying to set up a task in Windows 8 to automate my localhost db dump. I've created the task to run daily with the following command line: C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe and parameters: --user=root --password=donttellya --result-file=dumped.sql mydb It works but doesn't terminate (running in the tasks list). Also, I'd...

how to schedule a task for every 5 minutes in windows command prompt?

windows,scheduled-tasks,command-prompt,schtasks
Now i scheduling the bat files using task scheduler.But i want to do this using windows command prompt using schtasks command.That batch file should run for every five minutes and it should repeat the same thing in every day.

Execute Django shell command as cron

python,django,cron,scheduled-tasks,django-shell
I'm try to Execute Django shell command as cron, I have some queries and objects tasks to search and read and write using the models and queries of my django app. How I can execute this 1 or 2 times a day? For example, how can I run these queries...

MS Access running a funtion from scheduled task not working

windows-8.1,scheduled-tasks,ms-access-2003
I am trying to run a macro daily from the windows task scheduler (w8.1 for tesing and server 2012 in production - both have the same problem) my .bat file: C:\Batch\attrib.exe -r C:\...\db.mdb rem ping 1.1.1.1 -n 1 -w 10000 > nul "C:\Program Files (x86)\Microsoft Office 2003\OFFICE11\MSACCESS.EXE" "C:\...\db.mdb" /x "Launch"...

Infinite time in PowerShell?

powershell,scheduled-tasks,windows-server-2012,timespan
I'm trying to create a task which will repeat every 5 minutes indefinitely through powershell. However, I cannot figure out a way to do this through all my searching. New-TimeSpan -Days 9999 appears to be the maximum value, and no matter what I do I cannot get the time to...

Difference between * and ? in Spring @Scheduled(cron=“…”)

java,spring,cron,scheduled-tasks,scheduler
I've been looking at the Spring Boot example for scheduling tasks (https://spring.io/guides/gs/scheduling-tasks/) and reading through some documentation (https://javahunter.wordpress.com/2011/05/05/cronscheduler-in-spring/) and I see that * and ? are used almost interchangeably. For example, the line @Scheduled(cron = "0 15 10 ? * *") and @Scheduled(cron = "0 15 10 * * ?")...

@Schedule with CDI error:Could not get current FacesContext

java,ejb,scheduled-tasks,cdi
I'm trying to make a scheduler with the use of CDI My EJB Scheduler import java.time.LocalDateTime; import javax.ejb.Schedule; import javax.ejb.Singleton; import javax.inject.Inject; import javax.security.auth.login.LoginException; import br.com.timbrasil.bluemonster.csr.Crawler; @Singleton //@Startup public class Scheduler { @Inject private Crawler crawler; //TODO https://java.net/jira/browse/EJB_SPEC-1 @Schedule(hour="*",minute="*/1",second="0") public void downloadCsr() { System.out.println("Iniciando download dos CSRS"); LocalDateTime...

How can I know which type of process of linux will use for these?

linux,linux-kernel,operating-system,scheduled-tasks
if I am listening to an audio file, creating a presentation, and downloading something from the internet...while we know that: an audio file will use real-time creating a presentation will use interactive and downloading will use background but what I cannot know is for example: when an audio file will...

Schedule daily task in a Python app

python,windows,scheduled-tasks
I'm fairly new at Python in general, but I'm trying to create a small background application that will read an excel file and send me an e-mail every day on some condition. I was wondering what is the best way to go about this? Should I just use some sort...

Spring @Scheduled task runs twice

java,spring,spring-mvc,tomcat,scheduled-tasks
I am creating an @Scheduled task to run every 5 seconds. As has been a problem in other questions, my task is running twice! I have looked at other questions, and read the applicable documentation here, but I have not been able to figure out the problem. I know that...

Php schedule run a function after 10 minutes

php,cron,scheduled-tasks,sleep
There is a function A and function B What I would like to do is , after running function A, it start the counting , after 10 minutes it run the function B (for one time only). Notice that during the counting, the function A can be run again ,...

Running a python background script (Windows 7) to keep files updated

python,windows,scheduled-tasks
I have a list of websites I need to extract certain values from in order to keep a local .txt file up-to-date. Since the websites need to be checked at different time intervals I would prefer not to use Windows Task Manager but instead have a single script running continuously...

How to schedule a batch script file biweekly?

batch-file,scheduled-tasks,scheduling
I have batch file which calls multiple batch files within itself. I need this file to run biweekly (Friday's 10 A.M) when a file drops in a specific path. I checked the Windows task scheduler but it doesn't have biweekly option. I think we can use the trigger option (to...

Scheduled .bat file running SAS script fails to assign library but works when manually run?

batch-file,sas,scheduled-tasks
I have a scheduled task which is supposed to run a SAS script daily. It's unsuccessful, however, and leads to a result of 0x2. The .bat file is simply: "E:\Program Files\SAS\SASFoundation\9.2\Sas.exe" -sysin "C:\Documents and Settings\username\Desktop\myfolder\myscript.sas" I have logged the output and it indicates that the problem is that a library...

Scheduled Run of batch not logging output to file

windows,batch-file,cmd,scheduled-tasks
I have two batch files with one calling the other 1)test1.bat having content ping 127.0.0.1 2) test.bat having content call "D:\test1.bat" >>output1.txt 2>>&1 When I double click test.bat, as expected, the output is logged into output1.txt. however, when i schedule the same test.bat file, nothing gets logged. I am scheduling...

scheduling task in windows 2008 with powershell

windows,powershell,scheduled-tasks,powershell-v2.0,scheduler
i want to schedule task in windows 2008 r2 with powershell. i used $username = "BUILTIN\Users" $TaskName = 'kakaka' $t=1 $TaskRun = "$PSHome\powershell.exe Start-Process -FilePath 'C:\v.exe' -ArgumentList '/a' -Verb runas -WindowStyle Normal" $start = (Get-Date).AddMinutes($t).ToString("HH:mm") schtasks /create /ru $username /tn $Taskname /tr $TaskRun /sc once /st $start /f on using...

How to Launch Windows Phone Foreground App from VoipHttpIncomingCallTask?

c#,windows-phone,scheduled-tasks,sip,voip
I have an App that I have written in C# Windows Phone 8.0. I have implemented a VoipHttpIncomingCallTask called ScheduledAgentImpl : ScheduledTaskAgent. In this class the protected override void OnInvoke(ScheduledTask task) is called whenever a Push Notification comes in with the Type set to 4, for Incoming Call Notification. I...

Python understanding the scheduler

python,scheduled-tasks,scheduler
I've a python scheduler code to print Hello and World!. import sched import time def x(): print "Hello" s = sched.scheduler(time.time, time.sleep) s.enter(10, 1, x, ()) s.run() print "World!" This waits for 10 seconds and outputs: Hello World! I think a scheduler's job is to schedule a task without interrupting...

SSIS - job scheduler error

sql-server,ssis,scheduled-tasks,scheduler
I am using the scheduler to program the execution of a simple package of SSIS (it is a test). This is the code I'm using in my .bat file: @echo off "C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\DTExec.exe" /FILE "Complete Path\Package 1.dtsx" /CHECKPOINTING OFF /REPORTING EWCDI echo Finishing........ exit The SSIS package...

Scheduling java process for a specific time interval with a given delay

java,scheduled-tasks,scheduler,schedule
We want to schedule a java process to run till a specific time interval. Currently I am thinking to using TimerTask to schedule this process. In the start of every loop, will check the current time and then compare with the given time and stop the process if the time...

Win Scheduled Task cannot see PrintService

java,windows,printing,scheduled-tasks,scheduler
I have a java code that sends PDF files to printers. Java code goes something like this: import java.awt.print.PrinterJob; import javax.print.PrintService; import javax.print.PrintServiceLookup; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.pdfbox.pdmodel.PDDocument; public class PrintPdf { protected final Log logger = LogFactory.getLog(getClass()); public void print(String pdfFile, String printer, int copies) throws Exception {...

The system cannot find the file specified- Task Scheduler

powershell,batch-file,scheduled-tasks
I have batch script file, which should encrypt a file with pgp. I have defined a task in task scheduler to do this, but I am keep receiving the error"The system cannot find the file specified". Interestingly, when I run the same line of script in my powershell , the...

Spring scheduling task - run only once

java,spring,cron,scheduled-tasks
Is it possible to schedule Spring service method only once at exactly specified time? For example, current time is 2pm but when I hit the action button I want that my service method starts at 8pm. I'm familiar with @Scheduled annotation and I'm not sure how to write cron expression...

Running a batch file from windows task scheduler, but hidden or minimized

php,windows,batch-file,scheduled-tasks
I am running a .bat file from windows task scheduler every hour, the file is named: followers.bat And contains: @ECHO OFF C:\xampp\php\php.exe -f "C:\xampp\htdocs\Test\FollowTrackerV2\followers.php" It is entered in the task scheduler like so: program / script: C:\xampp\htdocs\Test\FollowTrackerV2\followers.bat parameters (optional): <blank> Start in (optional): C:\xampp\htdocs\Test\FollowTrackerV2 I tried adding parameter /min but...

How to send scheduled SMS messages in Android?

android,sms,android-sqlite,scheduled-tasks
I have to create an app which has some Mobile numbers in its database. It has to send SMS to everyone one of the number in the database at 12:00 AM everyday. I know how to add the numbers in database. But I don't know how to send scheduled messages...

Powershell script to copy file to network runs manually, but not from Task Scheduler

powershell,networking,scheduled-tasks,copy-item
I am running a script to copy a file from a local to network location. The script works if I call it myself via powershell, but not from Task Scheduler. I have looked at this and many other articles, but I cannot get it to work. Right now I can...

Migrating from Spring 3 to Spring 4 - org.springframework.scheduling.quartz.CronTriggerBean

java,spring,spring-mvc,scheduled-tasks,quartz-scheduler
I'm trying to migrate from spring 3.0.5 to spring 4.1.X . Spring 3 has Class named as "org.springframework.scheduling.quartz.CronTriggerBean" But Spring 4 has doesn't include this class name. [5/28/15 20:10:16:798 EDT] 00000092 ClassPathXmlA W org.springframework.context.support.AbstractApplicationContext __refresh Exception encountered during context initialization - cancelling refresh attempt org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.scheduling.quartz.CronTriggerBean] for...

Run scheduled tasks chain

java,multithreading,javafx,scheduled-tasks
I need run scheduled tasks one by one with different delays after previous task being executed. Example. There are a tasks list and delays list. toRun = {task1, task2, ..., taskn} delays = {100, 9, 22, ..., 1000} Now I need run task1 throgh 100ms, task2 after task1 through...

Looking to run automated jobs in .NET application

c#,.net,sql-server,automation,scheduled-tasks
Within a .NET application (.NET Framework 4.5), the following is occurring: A single record in a table in an SQL Server database is referred to as a job When the job is run, C# code is called Briefly to explain what it is doing, the job, when run, converts PDFs...

Windows Task Scheduler - Copy file from URL to Desktop

windows,powershell,csv,batch-file,scheduled-tasks
I'm wanting to create an automated job in Windows (presumably using Task Scheduler) to copy a CSV file from a URL to my desktop. From what I can gather, a batch file cannot copy a file from an external location. Not familiar with Powershell, but it looks like it might...

Scheduled task running under user with concurrent sessions

windows,scheduled-tasks
If I make a scheduled task that checks if a particular window is open, and it runs under a user (e.g. user "foo") with multiple sessions (e.g. 3 people are logged on the server as user "foo" at the same time), would that task check for the window in all...

scheduling task with powershell

powershell,scheduled-tasks,powershell-v3.0,webclient-download,schtasks.exe
I am trying to schedule task on remote computer where i was successful in scheduling a task on remote computer its not executing. like i wanted to download a file on some triggered time. in my task scheduler it shows task is completed successfully but i m not seeing any...

PHP Scheduled Task with Windows Authentication

php,sql-server,database-connection,scheduled-tasks,windows-server-2008
I am working on an PHP application hosted on Windows Server 2008. Sorry if some informations are not clear but this work has been made by another developer and I can not contact him. There is a scheduled task executed every week to synchronize some data from a SQL Server...

Open Windows Schedule Task Gui Properties with command line

windows,delphi,scheduled-tasks
I'm creating a Delphi component to schedule tasks in Windows using command line from schtasks. My doubt is: After creating the basic skeleton of the task I want to open their properties by the Windows task editor. I have not found a way to call the properties of a task...

Laravel 5 Command Scheduler, How to Pass in Options

laravel,command,queue,scheduled-tasks,laravel-5
I have a command that takes in a number of days as an option. I did not see anywhere in the scheduler docs how to pass in options. Is it possible to pass options in to the command scheduler? Here is my command with a days option: php artisan users:daysInactiveInvitation...

C++ send location inside of quotes

c++,scheduled-tasks,quotes
Im trying to execute task scheduler command from c++ but having problems with quotes. schtasks /create /sc onlogon /tn Executable /rl highest /tr "\"C:\Program Files\Executable\Executable.exe"\" How to send those bat command via WinExec? I try so far this WinExec("schtasks /create /sc onlogon /tn Executable /rl highest /tr \"""C:\\Program Files\\Executable\\Executable.exe\"""", 1);...

OpenMP: is there a timeout for a parallel section?

c++,parallel-processing,timeout,scheduled-tasks,openmp
I'm having a problem here with OpenMP. There are two functions that shall be executed in parallel. In foo() there's a loop that shall be interrupted with stop. And as you can see it is assigned in the the other OMP-section. The code is: char stop; #pragma omp parallel {...

Powershell -noexit needed for my script but how do I kill the powershell instance when done

session,powershell,scheduled-tasks,wrapper
I am trying to get a rather long Powershell script to run as a scheduled task. The script runs perfectly when I run it from the Powershell ISE but it doesn't work properly if I simply invoke it from a scheduled task unless I specify -noexit. So I have a...

Spring-MVC : Scheduled job did not execute

java,spring,spring-mvc,scheduled-tasks,scheduledexecutorservice
I am working on a Spring-MVC application in which I am using scheduling to delete extra stuff which is not necessary. Unfortunately, my scheduled method did not fire. Can anyone tell me what I did wrong. Here is the code : @Repository @Transactional @EnableScheduling public class NotificationDAOImpl implements NotificationDAO{ @Override...

SQL Server Stored Procedure with cursor

sql-server,stored-procedures,scheduled-tasks
I have following stored procedure which basically uses cursor to get people who have appointments today and sends them email. For some reason this query won't complete. When I try to execute it, it just spins and I had to stop it. I let it run for as long as...

Best practice for scehduled background task Android

android,service,timer,background,scheduled-tasks
I am creating a notification app, which will alert user after they set a reminder notification. My current implementation logic is: Create a Service, which starts running in background when user opens their app. In onCreate() method of service, I am implementing a Timer task which will repeat after 5000ms...

Is it OK to use HashedWheelTimer for long running and periodic tasks?

timer,scheduled-tasks,netty
Currently I am using the Netty timer for long running tasks (database access) and periodic tasks (simply creating new timeout on execution). But now I am getting unsure if this is alright.

Powershell/taskscheduler permissions

powershell,scheduled-tasks,virtual-machine,powershell-remoting
I am trying to run a TaskScheduler task on a Virtual Machine. The issue is, when I set the Security Options to "Run whether user is logged on or not," with the highest priviledges (Selected user account is an Domain Admin), the task fails. My PowerShell script writes a temporary...

Windows Server 2012 R2 - High CPU / Memory Usage Causes Task Scheduler to Not Run?

windows,scheduled-tasks,windows-server-2012,windows-server-2012-r2
I have a task that runs every minute on my Windows Server 2012 R2 machine. This task gathers the system usage stats for my machine and sends it to Amazon CloudWatch. I've noticed that during time periods of high CPU and memory usage, my stats aren't logged in Cloudwatch. I've...

Boot order on windows: Services vs scheduled tasks?

windows,windows-services,scheduled-tasks,vhd,virtual-disk
We deploy our software on a VHD drive that we load with diskpart and mount as drive. Currently we use schtasks.exe to remount the drive when the system reboots. Question: Can we use sc.exe to add an automatic service, where the service resides on the virtual hard drive? In other...

why custom tasks on windows scheduler do not execute..?

windows,powershell,scheduled-tasks,powershell-v3.0,windows-scheduler
I tried creating a task in windows task scheduler, where i put trigger on some specific time. but even when time passes task is not triggered. my task always shows me status "Ready", even at anticipated time is shows "Ready" not "Running" why is it so, if there is any...

HttpWebRequest.GetResponse Timeout issue when running from scheduled task on a server

vb.net,salesforce,httpwebrequest,scheduled-tasks
Currently i have a .NET application the logs into SalesForce using their API. From here I query an object to pull report information and build a URL that will export me a file. The code is as such. Dim request As HttpWebRequest Dim response As HttpWebResponse Dim stream as Stream...

Issues with Task Scheduler on Windows from .NET

c#,.net,windows,scheduled-tasks
I am using the Task Scheduler Managed Wrapper from https://taskscheduler.codeplex.com/ to build an app targeting .NET 4 on windows 7, that creates several tasks after deleting any old ones it created itself. Task registration seems to succeed but the tasks do not launch and have somehow corrupted the Task Scheduler...

How to implement scheduled task on EF (DB first) entities?

c#,asp.net,entity-framework,scheduled-tasks
I am quite new to Asp.net and have a website using Entity Framework. Every night, I need to do some work on my Person entities. Thus I installed Quartz.Net et tried to use it this way in Global.asax : <%@ Application Language="C#" %> <%@ Import Namespace="Quartz" %> <%@ Import Namespace="Quartz.Impl"...

R automatic task sheduling in windows: how to use external functions

r,windows,batch-file,scheduled-tasks
I have a sheduled task in windows to run a R program ("ftp.R") After many attempts and reading many SO litterature, I found that the only way to make it work properly was writing this piece of code into a .bat file: @ECHO OFF RSCRIPT ftp.R Everithing goes fine except...

How to launch cmd.exe to execute command using Task Scheduler ?

php,windows,scheduled-tasks
I want to launch cmd.exe to execute command using Task Scheduler : Here is my command line : C:\wamp\bin\php\php5.5.12\php.exe -f "C:\Inetpub\wwwroot\php\index.php" This command will load a php.exe and run my php script from C:\Inetpub\wwwroot\php Here is how I set up my task scheduler : I am not sure - what...

Java task scheduler run daily from start to end date

spring-boot,scheduled-tasks
I've got a spring boot application in java with some scheduled tasks I need to run at midnight every day, from 15th June to 15th August @Scheduled(cron = "0 0 0 15-30 5 ?") // Midnight every day from 15th June until end of month public void sendReminderEmailsJune() { doStuff();...

How the scheduled agent in Lotus Domino can run at some specific Hour

scheduled-tasks,lotusscript
I want my scheduled agent written in Lotusscript run at some specific Hour. For example,it should be run twice every day, at 8AM and 10PM, etc... But the Agent Trigger doesn't have the choices. It just have these four choces below: 1.More Than Once a Day:every one hour or every...