Command to execute a script later Command to execute a script later bash bash

Command to execute a script later


Take a look at the man page for at

man at

There are lots of ways you can specify the time. You can do something like:

at -f my_script.sh 23:00


Use cron job in linux.like

0 */12 1 11 3 /bin/execute/my/script.sh >/dev/null 2>&1


#!/usr/bin/pythonimport timetime.sleep(60*60*12)# your script here# for shell script:import subprocesssubprocess.call(['./my_script_name.sh'])

For anyone who doesn't have a ton of experience with shell scripts, make sure your .sh script has a shebang line at the top of the script #!/usr/bin/env bashand that it's executable with $ chmod 744 my_script.sh