Tag Info

New answers tagged


This seems to me a short line: atrm $(atq | cut -f1)


If you are just concerned with sending the message after 2 minutes irrespective of the approach, I would suggest using sleep. ( sleep 120 ; php -r 'include_once("/home/eamorr/open/open.ie/www/newsite /ajax/constants.php");sendCentralSMS("08574930418","hi");' )


You have an error in your syntax: php -r 'include_once("/home/eamorr/open/open.ie/www/newsite/ajax/constants.php");sendCentralSMS("08574930418","hi");' | at now + 2 minutes From man at: 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 ...


Because that's not how the at command works. at takes the command in via STDIN. What you're doing above is running the script and giving its output (if there is any) to at. This is the functional equivalent of what you're doing: echo hey | at now + 1 minute Since echo hey prints out just the word "hey" the word "hey" is all I'm giving at to execute one ...


Option 1 Schedule your job in cron to run every hour (or every other hour), but prefix the job with something like this (presuming you have SHELL=/bin/bash in your crontab): [ $[RANDOM % 12] -eq 0 ] || exit 0; YOUR_JOB_HERE Then there will be an approximately* one in twelve chance of the job running each time its scheduled. Option 2 Schedule a cron job ...


You could use the command 'at' at now +4 hours -f commandfile Or at now +$((($RANDOM % 10)+2)) hours -f commandfile


The at jobs do not appear in bash_history. Apparently once the jobs are run, they vanish. If you want to keep logs, you can add echo 'some comment' > ~/at.log lines manually.

Top 50 recent answers are included