What's a simple way to run a command, say, 8 hours from now? I can think of this way:
nohup bash -c "sleep 28800 ; ./mycommand.sh" &
Is there a more "proper" way?
You can use the
For more information, options, examples, and others see the Ubuntu Manpage Repository
You can also use convenient shorthands, like
The example also demonstrates how you can pipe actions into
|show 2 more comments|
Yes, you can set a cron job.
For example if now the time is 14:39:00 and today is friday, 30 august, you can add the following cron job (to be executed after 8 hours) in your crontab file using
|show 4 more comments|