Hangfire on different console applications

I have written two console applications. One with server and another with client and then ran two applications. However. Job from client is scheduled but is never executed by server. Am I doing anything wrong?

Did you look at the hangfire dashboard?
Is there a server connected?
On what queue are you enqueueing the job?
On what queue the server is registered?

I have written simple console applications for both server and client using same SQL server for both of them. So dashboard is not present. When client is run, jobs are queued in SQL server. However Server is not executing them.

I think it will be better for you to add some configuration to the server application to see what’s the deal with servers being registered and queues they are registered to.

Hi This is written in server console application

class Program
{
    static void Main(string[] args)
    {
        GlobalConfiguration.Configuration
            .SetDataCompatibilityLevel(CompatibilityLevel.Version_180)
            .UseSimpleAssemblyNameTypeSerializer()
            .UseRecommendedSerializerSettings()
            .UseSqlServerStorage("Data Source =MT-LTP-10106\\SQLEXPRESS;Initial Catalog=hangfire;User id=sa;Password=makromakro;TrustServerCertificate=True;");
        using (var server = new BackgroundJobServer())
        {
            Console.ReadLine();
        }
    }

    static void PrintServer()
    {
        Console.WriteLine("Hello, world from Server!");
    }
}

And this is code written in client console application

class Program
{
    static void Main(string[] args)
    {
        GlobalConfiguration.Configuration
           .SetDataCompatibilityLevel(CompatibilityLevel.Version_180)
           .UseSimpleAssemblyNameTypeSerializer()
           .UseRecommendedSerializerSettings()
           .UseSqlServerStorage("Data Source =MT-LTP-10106\\SQLEXPRESS;Initial Catalog=hangfire;User id=sa;Password=makromakro;TrustServerCertificate=True;");
        string v = BackgroundJob.Enqueue(() => PrintServer());

    }
}

In client console application, I get compilation error that The name ‘PrintServer’ does not exist in the current context. Am I missing any step. Please suggest

I think your client and server applications should both use a shared library for the client to compile.