Bash script to run commands in a screen session at specified time
-
screen
version 4 or greater -
Bash version 4 or greater
Clone this project...
mkdir -vp ~/git/hub/rpi-curious
cd ~/git/hub/rpi-curious
git clone git@github.com:rpi-curious/screen-at.git
Symbolically link the screen-at
script to location listed within your PATH
variable, eg...
cd ~/git/hub/rpi-curious/screen-at
ln -s "${PWD}/screen-at" "${HOME}/bin/"
Syntax
screen-at 'DATE' 'NAME' COMMAND ARGS...
-
DATE
, any valid date/time fordate
command, eg.+1 hour
to run command in an hour -
NAME
, uniquescreen
session name, eg.alarm
to name an alarming screen session -
COMMAND ARGS
, command with list of arguments/parameters, eg.google-chrome --new-window --incognito 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
Example
screen-at '+3 seconds'\
'given-up'\
google-chrome --new-window --incognito 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
Above example will start Chrome in a new window after three seconds within a
screen
session namedgiven-up
This repository may not be feature complete and/or fully functional, Pull Requests that add features or fix bugs are certainly welcomed.
-
Fork this repository to an account that you have write permissions for.
-
Add remote for fork URL. The URL syntax is
git@github.com:<NAME>/<REPO>.git
...
cd ~/git/hub/rpi-curious/screen-at
git remote add fork git@github.com:<NAME>/screen-at.git
- Commit your changes and push to your fork, eg. to fix an issue...
cd ~/git/hub/rpi-curious/screen-at
git commit -F- <<'EOF'
:bug: Fixes #42 Issue
**Edits**
- `screen-at` script, fixes some bug reported in issue
EOF
git push fork master
Note,
git push -u fork master
will set the default upstream remote such that futuregit push
commands are automatically directed at thefork
remote
- Then on GitHub submit a Pull Request through the Web-UI, the URL syntax is
https://github.com/<NAME>/<REPO>/pull/new/<BRANCH>
Note; to decrease the chances of your Pull Request needing modifications before being accepted, please check the dot-github repository for detailed contributing guidelines.
Documentation for script to run command in a screen session at specified time
Copyright (C) 2020 S0AndS0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For further details review full length version of AGPL-3.0 License.