Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7960825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:52:02+00:00 2026-06-04T04:52:02+00:00

Looks like I didn’t set up my actor correctly, but not sure how else

  • 0

Looks like I didn’t set up my actor correctly, but not sure how else I would do it. I set up an actor that is to be scheduled by Akka. However the compiler error I am getting is: not found: value MaidActor

Code:

/**
 * the engine maid
 */
class MaidActor extends Actor {
  def receive = {
    case "ChatMaid" => {
      println("A hot french maid will now clean up the chat database")
    }
  }
}

/**
 * scheduled jobs to run in the background
 */
object EngineJobs {

  /**
   * clean old chats to save database space
   */
  def setupJobs = {
      Akka.system.scheduler.schedule(0 seconds, 120 minutes, MaidActor, "ChatMaid")
  }

}

Thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:52:03+00:00Added an answer on June 4, 2026 at 4:52 am

    I solved it 🙂

    Was able to fix it by properly setting up my EngineJobs object. This was done by creating a new ActorSystem like so:

    /**
     * the engine maid
     */
    class MaidActor extends Actor {
      def receive = {
        case "tick" => {
          Logger.info("A hot french maid will now clean up the chat database")
          models.Chat.cleanOldChats
        }
      }
    }
    
    /**
     * scheduled jobs to run in the background
     */
    object EngineJobs {
    
      val system = ActorSystem("jobs")
      val Tick = "tick"
      val ChatMaid = system.actorOf(Props(new MaidActor))
    
      /**
       * set up jobs to be run in engine
       */
      def setupJobs = {
          Akka.system.scheduler.schedule(0 seconds, 10 seconds, ChatMaid, Tick)
      }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So i looked around a and didn't find anything that quite looks like what
It looks like it is a stupid question, but i could not figure how
I find myself writing code that looks like this a lot: set<int> affected_items; while
Looks like XSD.exe is not delivered as a part of Visual Studio 2010. what
Looks like the options are Propel, Doctrine, and ActiveRecord, others?, but I am only
Looks like a dumb question, but I tried the following (where Me is a
This looks like a very simple issue, but I just can't get it to
I have code that looks like this: public class Polynomial { List<Term> term =
I have a table that looks like this: ID |Name |Parent 1 |A |NULL
I have a [Range] annotation that looks like this: [Range(0, 100)] public int AvailabilityGoal

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.