Questions tagged [taskservice]

20 questions
36
votes
5 answers

Strategy Pattern with different parameters

I came across a problem when using the strategy pattern. I am implementing a service for creating tasks. This service also resolves the responsible clerk for this task. Resolving the clerk is done by using the strategy pattern because there are…
Daniel
  • 835
  • 1
  • 7
  • 18
6
votes
1 answer

C# Task Scheduler in Remote Machine

I'm trying to set up a program that would create a task schedule in a remote server. The following code works fine for local machine however when I try it with the remote server, it throws up the following error.…
3
votes
1 answer

c# : Create windows scheduled task as a different user

I'm creating Windows Scheduled Tasks dynamically from c# using the build-in TaskService and TaskDefinition libraries. But for some of them, we need to create then to run as a different user (Local Service or Network Service). As the tasks are…
Cameron Castillo
  • 2,712
  • 10
  • 47
  • 77
2
votes
1 answer

Adding a BootTrigger for a Scheduled Task gives Access Denied Error (MVC app)

I'm creating a scheduled task using c# from a MVC app. It works fine, but I am not able to add a BootTrigger: TaskDefinition td = ts.NewTask(); TaskService ts = new TaskService(); td.RegistrationInfo.Description = "Some…
Cameron Castillo
  • 2,712
  • 10
  • 47
  • 77
2
votes
1 answer

TaskService not working

I'm trying to write some code that uns the task on my local workstation after a certain period of time but at the moment I'm having problems getting the work to be done. Below is the code I am running. using System; using…
Aditya Korti
  • 692
  • 2
  • 12
  • 28
1
vote
1 answer

Run Method in TaskService C# ?

I want to execute a function in given date just once and i'm done with the Task. What should i do? static void Main(string[] args) { DateTime date = GetExecuteTime(); using (TaskService ts = new TaskService()) { // Create…
1
vote
1 answer

Creating Scheduled Task from MVC sometimes fails via LocalService user

I'm creating a Windows Scheduled Task from a MVC app # by using the c# TaskService namespace. It normally works fine if the IIS AppPool is set to run as the LocalService user, but every now and then we find a server where it fails to create the…
Cameron Castillo
  • 2,712
  • 10
  • 47
  • 77
1
vote
1 answer

Any example for Restlet TaskService?

I am a Restlet program which will be executed in a Linux Server as a background process, since it is going to pull many data from several websites, I will make it to execute this task as a second thread for every 5 minutes; in Restlet I know there…
Alison
  • 31
  • 2
0
votes
0 answers

MarkLogic Task server has a lot of tree misses

I have a query for ingesting some triples which I run inside spawn function.The task server uses 8 threads to execute the query. The status of the task server shows that there are a lot of tree misses and zero expanded hits. No results stored for…
0
votes
0 answers

c# TaskScheduler.TaskService.FindTask sometimes return a task when no task exists

I've had a long standing problem where the TaskScheduler.TaskService.FindTask method sometimes return a reference to a task, even though the task does not exist. Note that the task with the given name has existed at some point, but it has been…
Cameron Castillo
  • 2,712
  • 10
  • 47
  • 77
0
votes
1 answer

Spring-boot Activiti TaskUser causes rollback when perform TaskService.complete

The workflow suspend at a UserTask. After setting the local and process variables, I tried to TaskService.complete(task.getId()). When leave the method, it Rollback. However, there is no information where I can see what actually causes in the…
bmw34
  • 111
  • 4
0
votes
1 answer

How to save a new trigger on an existing Scheduled Task

I'm using the TaskService class to create and edit Windows Scheduled Tasks. One problem I have is how to save a new trigger on an existing Scheduled Task. The trigger does not seem to save. var task = new TaskService().FindTask("My Scheduled…
Cameron Castillo
  • 2,712
  • 10
  • 47
  • 77
0
votes
0 answers

Is there anyway to programatically delete a task from the task scheduler aside from using its name in C#

This is what I'm currently using, but I'm looking for another way that doesn't require the task name. using (TaskService ts = new TaskService()) { ts.RootFolder.DeleteTask(TaskName); }
hashguard
  • 403
  • 4
  • 22
0
votes
1 answer

SpringBoot Camunda Starter access TaskService in RestController

I followed this example: https://github.com/camunda/camunda-bpm-spring-boot-starter/tree/master/examples/camunda-spring-boot-starter-example-simple when i access the taskService in this class: @Component public class TaskHelper { private final…
Hans
  • 119
  • 1
  • 12
0
votes
1 answer

Schedule a task in Android using GcmNetworkManager?

I want to run a service daily at 9:00 PM in the night and do some work. I am using GcmNetworkManager class but I can't figure out on how to give the exact time and date to the PeriodicTask. This is my GcmTaskService class public class Sc extends…
WISHY
  • 11,067
  • 25
  • 105
  • 197
1
2