   end
 
   def handle_info(:start_worker, state) do
-    Supervisor.restart_child(
+    result = Supervisor.restart_child(
       ExMoney.Supervisor,
       ExMoney.Saltedge.TransactionsWorker
     )
+    Logger.info("Time to wake up, TransactionsWorker has been started with result => #{inspect(result)}")
 
     Process.send_after(self(), :schedule, @interval)
 

defmodule ExMoney.Saltedge.TransactionsScheduler do
  use GenServer
  require Logger

  alias ExMoney.Account
  alias ExMoney.Repo

  @interval 60 * 1000


    case current_hour() do
      hour when hour >= 0 and hour < 7 ->
        # FIXME: handle genserver answer
        result = GenServer.call(:transactions_worker, :stop)
        Logger.info("Time to sleep, TransactionsWorker has been stopped with result => #{inspect(result)}")
        # Start transactions worker in 7 hours
        Process.send_after(self(), :start_worker, 7 * 60 * 60 * 1000)

