Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduler for actions --> CRON JOBS #757

Closed
isatahiri opened this issue Aug 31, 2020 · 23 comments
Closed

Scheduler for actions --> CRON JOBS #757

isatahiri opened this issue Aug 31, 2020 · 23 comments
Labels
Enhancement Reactive.XAF eXpandFrameowrk/DevExpress.XAF project
Milestone

Comments

@isatahiri
Copy link

饾棗饾棽饾榾饾棸饾椏饾椂饾棷饾棽 饾榿饾椀饾棽 饾榾饾椉饾椆饾槀饾榿饾椂饾椉饾椈 饾槅饾椉饾槀'饾棻 饾椆饾椂饾椄饾棽
I would like to be able to schedule a given action.
The actions should be type of Simple action (no parameters from the user) as a start.
So they become Cron Jobs. The idea is that a XAF developper codes the actions by himself and the scheduling should be done by the enduser in XAF UI directly.

I'm ready to financially contribute to it. (to be discussed)
Maybe some other users/members can also contribute or add functional needs ?

@isatahiri
Copy link
Author

Is there a way to broadcast ideas to the community with GitHub ?

@apobekiaris
Copy link
Member

if u mean to other social channels like fb or linkedIn no. However happy to pin and tweet from our account and you could repost to other channels your self. To me sounds a great idea to share the funds, ideas, and testing of this feature

@apobekiaris apobekiaris pinned this issue Aug 31, 2020
@apobekiaris
Copy link
Member

upon interest we can open a discussion forum here in GitHub where participants can collaborate to avoid a long issue and not to disturb non interested users

@apobekiaris
Copy link
Member

so i Guess we need a +1 from the interested users and we can invite them to the discussion forum to continue

@andrejskvorc
Copy link

Good idea :) i have done something with Windows service, but shouls i put description that i wrote on linkedin here or wait to post it on forum?

@apobekiaris
Copy link
Member

at the moment let's avoid commenting as it will lead to an unreadable thread. All member will invited to another dedicated discussion forum here at GitHub where we can organized subjects better.

Thanks for participating.

@apobekiaris
Copy link
Member

just a +1 is enough for now

@bertstomphorst
Copy link

I've created a Windows-service solution also, together with a BusinessObject that registers the scheduledtasks (with some scheduling properties) + an interface for task-exection. The WindowsService creates/removes the BusinessObjects from the database. End-users can enable/disable tasks, set scheduling-options, and see last/next run-time + last result (succeeded/errors).
Tasks are parallel scheduled/executed. This works fine for our needs.

@apobekiaris apobekiaris added the Reactive.XAF eXpandFrameowrk/DevExpress.XAF project label Sep 4, 2020
@apobekiaris
Copy link
Member

We will outline your existing implementation along with the detailed bossiness scenarios you want to address and libraries/framework we should consider for helping us later.

I want to give the community time to decide if wants to participate. So, probably another full week or so then we will move to a private forum to discuss the working model as it involves sensitive topics such as production apps and funding. Until we reach a proof of concept we will remain private and we will move to public along with the first build. Testing pipes integration may not be immediate and only run locally on my side as this integration requires a lot of resources and further scaling #759

Now I want to state the benefits of implementing the solution as suggested from Isa Tahiri.

  1. We will go for a standalone module with no dependencies to any of the main framework packages.
  2. The standalone architecture is platform agnostic so we should be able to target both win/web.
  3. With the Xpand.VersionConverter we can achieve the value-able version agnostic feature in respect to XAF which implies that each user may use a any version of XAF with any version of this module with no need to update.
  4. Integration tests will run for each build.
  5. EasyTests and integration tests will run for each build.
  6. Cost will be shared among the participants,
  7. Support will be prioritized for the participating sponsors.
  8. The architecture will consider a minimal deployment scenario.
  9. Apparently when released even on lab servers all community will be able to use, test and feedback on the module.
  10. The module as all standalone modules is considered released only when documentation is published.

Hopefully I did not forget something. Looking forward for feedback along these lines if any from everybody participants or not. Maybe users in this post also interested to join us

@apobekiaris
Copy link
Member

thnks all participant for the thumbs up I invite you to a private chat room where we can start this work. The room is open for anyone else as well. The cost unless you want to go to Marsh wont change you will just need to sponsor your share

@apobekiaris
Copy link
Member

@andrejskvorc @bertstomphorst please send me your mail so i can invite you, My mail is visible in my profile

@kashiash
Copy link

Hi Apostolis, where can i find invitation to this chat room ?

@apobekiaris
Copy link
Member

it's a Gitter room u and @maginfo are already added all others i couldn;t cause I do not have your emails

https://gitter.im/xpandframework/cron-jobs

@bertstomphorst
Copy link

@apobekiaris the room doesn't seem to work? Or is still private?

@apobekiaris
Copy link
Member

yes this a private room i need your email to invite u

image

@sheldmandu
Copy link

@isatahiri @bertstomphorst If you guys are interested, our company has already built a fully functional Job Server with ability to run Background Jobs (that kick off straight away but run by a separate process in the background) as well as Scheduled Jobs (that run on a Cron Schedule). It's fully functional with a UI for monitoring jobs, etc. It uses Hangfire rather than Quartz and because of that has a much cleaner architecture without need for stuff like remoting, etc. It can run on either SqlServer or Redis if you need higher performance. Essentially you can do everything that's supported in Hangfire and have a full XAF based UI for monitoring and managing jobs. See some UI here... https://i.imgur.com/4Q8Q0Yn.png As you can see in the screenshot we process thousands of jobs so it's definitely pretty robust. If that's something that may be of interest please feel free to reach out.

@isatahiri
Copy link
Author

this link does not work
https://gitter.im/xpandframework/cron-jobs

@apobekiaris
Copy link
Member

try again I just added to the room

@apobekiaris
Copy link
Member

I chose to procced with Hangfire and Blazor only because Hangfire is well integrate to the aspnet core pipeline and has great docs and very active community. I just pushed the first prototype based on these tests

https://github.com/eXpandFramework/DevExpress.XAF/blob/lab/src/Tests/JobScheduler.Hangfire/JobSchedulerTests.cs

In short the module creates a SharedYourXAFAppBlazorApplication and use it to feed the jobs. A job can use this instance providing a constructor with only one argument of type BlazorApplication

    [JobProvider()]
    public class ImportDataJob {
        private readonly XafApplication _application;
        

        public ImportDataJob() {
        }

        public ImportDataJob(BlazorApplication application){
            _application = application;
        }

        public void CustomerOrders() {
            using var objectSpace = _application.CreateObjectSpace();
        }

    }

@apobekiaris
Copy link
Member

The pre-release 2.201.22.2 in the DevExpress.XAF lab branch includes commits that relate to this task:

To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Released packages: Xpand.Extensions v.4.202.44.2
Xpand.Extensions.Blazor v.4.202.44.2
Xpand.Extensions.Mono.Cecil v.4.202.44.2
Xpand.Extensions.Office.Cloud v.4.202.44.2
Xpand.Extensions.Office.Cloud.Google.Blazor v.4.202.44.2
Xpand.Extensions.Reactive v.4.202.44.2
Xpand.Extensions.XAF v.4.202.44.2
Xpand.Extensions.XAF.Xpo v.4.202.44.2
Xpand.XAF.Core.All v.4.202.44.2
Xpand.XAF.Modules.AutoCommit v.4.202.44.2
Xpand.XAF.Modules.CloneMemberValue v.4.202.44.2
Xpand.XAF.Modules.CloneModelView v.4.202.44.2
Xpand.XAF.Modules.GridListEditor v.4.202.44.2
Xpand.XAF.Modules.HideToolBar v.4.202.44.2
Xpand.XAF.Modules.JobScheduler.Hangfire v.4.202.44.2
Xpand.XAF.Modules.LookupCascade v.4.202.44.2
Xpand.XAF.Modules.MasterDetail v.4.202.44.2
Xpand.XAF.Modules.ModelMapper v.4.202.44.2
Xpand.XAF.Modules.ModelViewInheritance v.4.202.44.2
Xpand.XAF.Modules.Office.Cloud.Google v.4.202.44.2
Xpand.XAF.Modules.Office.Cloud.Google.Calendar v.4.202.44.2
Xpand.XAF.Modules.Office.Cloud.Google.Tasks v.4.202.44.2
Xpand.XAF.Modules.Office.Cloud.Microsoft v.4.202.44.2
Xpand.XAF.Modules.Office.Cloud.Microsoft.Calendar v.4.202.44.2
Xpand.XAF.Modules.Office.Cloud.Microsoft.Todo v.4.202.44.2
Xpand.XAF.Modules.Office.DocumentStyleManager v.4.202.44.2
Xpand.XAF.Modules.OneView v.4.202.44.2
Xpand.XAF.Modules.PositionInListView v.4.202.44.2
Xpand.XAF.Modules.ProgressBarViewItem v.4.202.44.2
Xpand.XAF.Modules.Reactive v.4.202.44.2
Xpand.XAF.Modules.Reactive.Logger v.4.202.44.2
Xpand.XAF.Modules.Reactive.Logger.Client.Win v.4.202.44.2
Xpand.XAF.Modules.Reactive.Logger.Hub v.4.202.44.2
Xpand.XAF.Modules.RefreshView v.4.202.44.2
Xpand.XAF.Modules.SequenceGenerator v.4.202.44.2
Xpand.XAF.Modules.SuppressConfirmation v.4.202.44.2
Xpand.XAF.Modules.ViewEditMode v.4.202.44.2
Xpand.XAF.Modules.ViewItemValue v.4.202.44.2
Xpand.XAF.Modules.ViewWizard v.4.202.44.2
Xpand.XAF.Web.All v.4.202.44.2
Xpand.XAF.Win.All v.4.202.44.2

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.

If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.

Thanks a lot for your contribution.

@apobekiaris apobekiaris added this to the 20.2.203.0 milestone Dec 15, 2020
@apobekiaris
Copy link
Member

The pre-release 2.201.23.1 in the DevExpress.XAF lab branch includes commits that relate to this task:

To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Released packages: Xpand.Extensions v.4.202.45.1
Xpand.Extensions.Blazor v.4.202.45.1
Xpand.Extensions.Mono.Cecil v.4.202.45.1
Xpand.Extensions.Office.Cloud v.4.202.45.1
Xpand.Extensions.Office.Cloud.Google.Blazor v.4.202.45.1
Xpand.Extensions.Reactive v.4.202.45.1
Xpand.Extensions.XAF v.4.202.45.1
Xpand.Extensions.XAF.Xpo v.4.202.45.1
Xpand.VersionConverter v.2.202.12
Xpand.XAF.Core.All v.4.202.45.1
Xpand.XAF.Modules.AutoCommit v.4.202.45.1
Xpand.XAF.Modules.Blazor v.4.202.45.1
Xpand.XAF.Modules.CloneMemberValue v.4.202.45.1
Xpand.XAF.Modules.CloneModelView v.4.202.45.1
Xpand.XAF.Modules.GridListEditor v.4.202.45.1
Xpand.XAF.Modules.HideToolBar v.4.202.45.1
Xpand.XAF.Modules.JobScheduler.Hangfire v.4.202.45.1
Xpand.XAF.Modules.LookupCascade v.4.202.45.1
Xpand.XAF.Modules.MasterDetail v.4.202.45.1
Xpand.XAF.Modules.ModelMapper v.4.202.45.1
Xpand.XAF.Modules.ModelViewInheritance v.4.202.45.1
Xpand.XAF.Modules.Office.Cloud.Google v.4.202.45.1
Xpand.XAF.Modules.Office.Cloud.Google.Calendar v.4.202.45.1
Xpand.XAF.Modules.Office.Cloud.Google.Tasks v.4.202.45.1
Xpand.XAF.Modules.Office.Cloud.Microsoft v.4.202.45.1
Xpand.XAF.Modules.Office.Cloud.Microsoft.Calendar v.4.202.45.1
Xpand.XAF.Modules.Office.Cloud.Microsoft.Todo v.4.202.45.1
Xpand.XAF.Modules.Office.DocumentStyleManager v.4.202.45.1
Xpand.XAF.Modules.OneView v.4.202.45.1
Xpand.XAF.Modules.PositionInListView v.4.202.45.1
Xpand.XAF.Modules.ProgressBarViewItem v.4.202.45.1
Xpand.XAF.Modules.Reactive v.4.202.45.1
Xpand.XAF.Modules.Reactive.Logger v.4.202.45.1
Xpand.XAF.Modules.Reactive.Logger.Client.Win v.4.202.45.1
Xpand.XAF.Modules.Reactive.Logger.Hub v.4.202.45.1
Xpand.XAF.Modules.RefreshView v.4.202.45.1
Xpand.XAF.Modules.SequenceGenerator v.4.202.45.1
Xpand.XAF.Modules.SuppressConfirmation v.4.202.45.1
Xpand.XAF.Modules.ViewEditMode v.4.202.45.1
Xpand.XAF.Modules.ViewItemValue v.4.202.45.1
Xpand.XAF.Modules.ViewWizard v.4.202.45.1
Xpand.XAF.Web.All v.4.202.45.1
Xpand.XAF.Win.All v.4.202.45.1

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.

If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.

Thanks a lot for your contribution.

@apobekiaris
Copy link
Member

In the screencast you can see how to declare, schedule, pause, resume and get more details for a Job.

Xpand.XAF.Modules.JobScheduler.Hangfire.mp4

@apobekiaris
Copy link
Member

The pre-release 2.201.25.0 in the DevExpress.XAF lab branch includes commits that relate to this task:

To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Released packages: Xpand.Extensions v.4.202.48
Xpand.Extensions.Blazor v.4.202.48
Xpand.Extensions.Mono.Cecil v.4.202.48
Xpand.Extensions.Office.Cloud v.4.202.48
Xpand.Extensions.Office.Cloud.Google.Blazor v.4.202.48
Xpand.Extensions.Reactive v.4.202.48
Xpand.Extensions.XAF v.4.202.48
Xpand.Extensions.XAF.Xpo v.4.202.48
Xpand.TestsLib v.4.202.48
Xpand.TestsLib.Blazor v.4.202.48
Xpand.TestsLib.Common v.4.202.48
Xpand.TestsLib.Net461 v.4.202.48
Xpand.XAF.Core.All v.4.202.48
Xpand.XAF.Modules.AutoCommit v.4.202.48
Xpand.XAF.Modules.Blazor v.4.202.48
Xpand.XAF.Modules.CloneMemberValue v.4.202.48
Xpand.XAF.Modules.CloneModelView v.4.202.48
Xpand.XAF.Modules.GridListEditor v.4.202.48
Xpand.XAF.Modules.HideToolBar v.4.202.48
Xpand.XAF.Modules.JobScheduler.Hangfire v.4.202.48
Xpand.XAF.Modules.LookupCascade v.4.202.48
Xpand.XAF.Modules.MasterDetail v.4.202.48
Xpand.XAF.Modules.ModelMapper v.4.202.48
Xpand.XAF.Modules.ModelViewInheritance v.4.202.48
Xpand.XAF.Modules.Office.Cloud.Google v.4.202.48
Xpand.XAF.Modules.Office.Cloud.Google.Calendar v.4.202.48
Xpand.XAF.Modules.Office.Cloud.Google.Tasks v.4.202.48
Xpand.XAF.Modules.Office.Cloud.Microsoft v.4.202.48
Xpand.XAF.Modules.Office.Cloud.Microsoft.Calendar v.4.202.48
Xpand.XAF.Modules.Office.Cloud.Microsoft.Todo v.4.202.48
Xpand.XAF.Modules.Office.DocumentStyleManager v.4.202.48
Xpand.XAF.Modules.OneView v.4.202.48
Xpand.XAF.Modules.PositionInListView v.4.202.48
Xpand.XAF.Modules.ProgressBarViewItem v.4.202.48
Xpand.XAF.Modules.Reactive v.4.202.48
Xpand.XAF.Modules.Reactive.Logger v.4.202.48
Xpand.XAF.Modules.Reactive.Logger.Client.Win v.4.202.48
Xpand.XAF.Modules.Reactive.Logger.Hub v.4.202.48
Xpand.XAF.Modules.RefreshView v.4.202.48
Xpand.XAF.Modules.SequenceGenerator v.4.202.48
Xpand.XAF.Modules.SuppressConfirmation v.4.202.48
Xpand.XAF.Modules.ViewEditMode v.4.202.48
Xpand.XAF.Modules.ViewItemValue v.4.202.48
Xpand.XAF.Modules.ViewWizard v.4.202.48
Xpand.XAF.Web.All v.4.202.48
Xpand.XAF.Win.All v.4.202.48

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.

If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.

Thanks a lot for your contribution.

@apobekiaris apobekiaris removed this from the 20.2.203.0 milestone Jan 10, 2021
@apobekiaris apobekiaris added this to the 20.2.403.0 milestone Jan 10, 2021
@apobekiaris apobekiaris unpinned this issue Jan 10, 2021
@apobekiaris apobekiaris removed their assignment Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Reactive.XAF eXpandFrameowrk/DevExpress.XAF project
Projects
None yet
Development

No branches or pull requests

6 participants