November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Can you post the definition of the jobs here to see if they are properly defined?
Also can you check tblScheduledItem to see if they are enabled? (Enabled column = true)
Here is one. They do work if called via API. All the jobs are in tblScheduledItem table and are enabled.
/// <summary>
/// Start Service Import Job From Code
/// GUID = "2F21F473-31F0-4A5C-804A-8DD511E38E72"
/// </summary>
/// <returns></returns>
public IActionResult StartServiceImportEpiJobFromCode()
{
string message = StartScheduledJob(Id: new Guid("2F21F473-31F0-4A5C-804A-8DD511E38E72")).ToString();
DisplayMessageAfterRedirect(message);
return RedirectToAction("Index");
}
/// <summary>
/// Import Services from EPiServer
/// </summary>
[EPiServer.PlugIn.ScheduledPlugIn(DisplayName = "Service Import",
Description = "Service Import",
GUID = "2F21F473-31F0-4A5C-804A-8DD511E38E72",
DefaultEnabled = true,
Restartable = true,
SortIndex = 1000)]
Found out some more info. We had added [assembly: EPiServer.Framework.PreventAssemblyScan] to most of out projects to decrease the amount of memory. By do this, we decreased memory usage by 200%. Now just need to add those projects back in that have scheduled tasks. Maybe someone knows of a way I can manually add those jobs back in without have them scan our projects and use so much memory.
Then it would make senses to have a separate project with scheduled jobs only ...
Interesting challenge, Eric.
The framework automatically scans the assemblies for scheduled jobs and then synchronizes them to the database. Now, since you disabled scanning of assemblies that does not work.
I guess you could manually synchronize the jobs to the database in each project that contains jobs. Although it will contain some boilerplate code, as the synchronization is internal and you would need to reimplement it in your own code (maybe in a common utility project).
I am not sure if initialization modules will be run in assemblies that prevent scanning. But it might be worth trying to call the synchronization from in such a module in each assembly..
If initialization module doesn't work, and you run CMS 12, then you could maybe create a IFirstRequestInitializer implementation that makes hardcoded calls to a class in each relevant assembly that then synchronizes the jobs. This sounds complicated, but may be the way, since the ServiceCollectionExtensions pattern will be invoked at an early stage.
I have almost 50 projects in my solution. One of those is for EPiServer Admin. I have most of my projects under a parent project and that parent project is part of my EPiAdmin project. Mostof these child projects have EPiServer job. These child project jobs are not showing within EPiServer Admin under Scheduled Jobs. How do I make these show up?
EPiAdmin Project
-- Dependencies
-- Projects
-- Parent Project
-- Child Project 1 with epi jobs
-- Child Project 2 with epi jobs
-- Child Project 3 with epi jobs