eXpandFramework / eXpand

DevExpress XAF (eXpressApp) extension framework. 𝗹𝗶𝗻𝗸𝗲𝗱𝗶𝗻.𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸.𝗰𝗼𝗺, 𝘆𝗼𝘂𝘁𝘂𝗯𝗲.𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸.𝗰𝗼𝗺 and 𝘁𝘄𝗶𝘁𝘁𝗲𝗿 @𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸 and or simply 𝗦𝘁𝗮𝗿/𝘄𝗮𝘁𝗰𝗵 this repository and get notified from 𝗚𝗶𝘁𝗛𝘂𝗯
http://expand.expandframework.com
Microsoft Public License
221 stars 115 forks source link

Scheduler for actions --> CRON JOBS #757

Closed isatahiri closed 3 years ago

isatahiri commented 4 years ago

𝗗𝗲𝘀𝗰𝗿𝗶𝗯𝗲 𝘁𝗵𝗲 𝘀𝗼𝗹𝘂𝘁𝗶𝗼𝗻 𝘆𝗼𝘂'𝗱 𝗹𝗶𝗸𝗲 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 commented 4 years ago

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

apobekiaris commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

andrejskvorc commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

just a +1 is enough for now

bertstomphorst commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

kashiash commented 4 years ago

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

apobekiaris commented 4 years ago

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 commented 4 years ago

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

apobekiaris commented 4 years ago

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

image

sheldmandu commented 4 years ago

@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 commented 4 years ago

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

apobekiaris commented 4 years ago

try again I just added to the room

apobekiaris commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

https://user-images.githubusercontent.com/159464/103535942-4c7b2100-4e9a-11eb-879c-4ec435e0a11e.mp4

apobekiaris commented 3 years ago

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.