Bash script to run commands in a screen session at specified time
-
screenversion 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.gitSymbolically 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 fordatecommand, eg.+1 hourto run command in an hour -
NAME, uniquescreensession name, eg.alarmto 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
screensession 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 masterNote,
git push -u fork masterwill set the default upstream remote such that futuregit pushcommands are automatically directed at theforkremote
- 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.