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 8995231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:35:32+00:00 2026-06-15T23:35:32+00:00

As part of a slightly complex script, I need to tell a server to

  • 0

As part of a slightly complex script, I need to tell a server to run a simulation. Normally, I would achieve this by doing ssh user@server 'simulation/script'. However, doing so would keep the ssh session alive until 'simulation/script' is done, which is undesirable to me.

I recently learned about the at command, and it seems to fit into my problem well.
What I want to do now is to ssh into my server, and at my simulation script to run in 5 seconds (more than enough time for the ssh connection to be closed). Thus, once the ssh connection is closed within 5 seconds, the server will start the simulation without needing the ssh connection to stay alive.

What I’m having trouble with is the time expression that at needs in order to schedule a job “5 seconds from now”

I have tried the following time expressions, all of which give me errors:

now + 5 seconds
now + 5 sec
now + 5 s
now + 5seconds
now + 5sec
now + 5 s
now+5sec
now+5seconds
now+5s

How can I get my at to run my command “5 seconds from now”?

  • 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-15T23:35:33+00:00Added an answer on June 15, 2026 at 11:35 pm

    There’s no seconds in at :

    man at said :

    • specification of a date must follow the specification of the time of day. You can also give times like now + count time-units,
      where the time-units can be minutes, hours, days, or weeks and
      you can tell at to run the job today by suffixing the time with today and to run the job tomorrow by suffixing the time with
      tomorrow.

    So instead of at, you could use a sleep I think.

    See man 1 sleep


    If you’d like to run ssh user@server 'simulation/script' without waiting, simply do :

    ssh user@server 'simulation/script' &
    

    the command will run in the background.

    Moreover, as Rawkode said, nohup will help there.

    So finally :

    nohup ssh user@server 'simulation/script' &
    

    with nohup, you can quit your terminal and have the ssh process alive.


    EDIT: if you want to run the ssh command and close the connection :

    ssh user@server 'simulation/script &'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting slightly confused about all this... Chrome and Firefox both tell me
Part of my web application is a background script that polls from a beanstalkd
Part of my code I get the OuterHTML propery <LI onclick=TabClicked(this, 'SearchName', 'TabGroup1');>Name so
Part of my code goes like this: while(1){ my $winmm = new Win32::MediaPlayer; $winmm->load('1.mp3');
Part of a complex query that our app is running contains the lines: ...(inner
Updated: please see this other thread instead, all this COM stuff is not part
I've got a slightly tricky problem to solve; imagine this: One of my applications
I follow next tutorial (first part of it), but with slightly simple class structure
I am slightly stuck on the javascript logic to accomplish this. Basically If I
I have a few links that are slightly smaller (at their bottom part) than

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.