Skip to content

Bash script to run commands in a screen session at specified time

License

Notifications You must be signed in to change notification settings

rpi-curious/screen-at

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Screen At

Bash script to run commands in a screen session at specified time

Byte size of Screen At Open Issues Open Pull Requests Latest commits



Requirements

  • screen version 4 or greater

  • Bash version 4 or greater


Quick Start

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/"

Usage

Syntax

screen-at 'DATE' 'NAME' COMMAND ARGS...
  • DATE, any valid date/time for date command, eg. +1 hour to run command in an hour

  • NAME, unique screen 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 named given-up


Notes

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 future git push commands are automatically directed at the fork 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.


Attribution


License

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.

About

Bash script to run commands in a screen session at specified time

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

Languages