Molecular Modeling and Drug Design
  • About us
  • Research
  • Publications
  • Members
  • Webservers
  • Calendar
  • Blog
  • Benchmarks
  • ALLODD
  • Image Gallery
  • Publicity
  • Talks

Scheduling non-interactive ssh/sftp tasks with cron

12/20/2013

0 Comments

 

How to schedule tasks (e.g the execution of a shell
script or a gromacs command) using the crontab command, for example the transfer of files from a remote host using
sftp/scp.

First you define the text editor you want to use for editing the crontab
file, where the scheduling is defined

export EDITOR=nedit (or your favourite text editor)

Then, you edit the crontab file by issuing

crontab -e

A crontab file entry has the following format

minute (0-59) hour (0-23, 0 = midnight) day (1-31) month (1-12) weekday
(0-6, 0 =
Sunday) command
Example:

55 22 21 12 6 cd /home/george/Arp23/; bash do_sftp

On Saturday (day 6), 21st of December at 22:55 the cron daemon will do the
following:

 - Change to dir /home/george/Arp23/
 - Execute the do_sftp script located in this dir

You can have as many commands separated by the character ;
as you want.

Please don't forget the cd command as shown above because cron executes
commands by
default in the home dir

If you want to run a GROMACS command, make sure to source the version you
want to
use, like for example

55 22 21 12 6 cd /home/george/Arp23/; source
gromacs-installation-dir/bin/GMXRC;
g_cluster -s ...

To download from the CURIE cluster in France, the do_sftp script mentioned
above
will look like this

#! /bin/bash
sshpass -p 'password' sftp patargig@curie.ccc.cea.fr << !
cd /ccc/work/cont005/ra1260/patargig/act_MG_DUMMY
get prod1_out*
bye
!

This script downloads all files that contain "prod1_out" in their name.The
program sshpass is used for establishing an ssh/sftp connection non
interactively. If it is not installed in your machine, you issue

sudo apt-get install sshpass

In this way, we can transfer files after working hours but the fact that
the password is contained in plain text in the script, poses a security
risk.

George

0 Comments

Storage space

12/12/2013

0 Comments

 
SurDoc is a cloud storage that gives for free 100GB https://www.surdoc.com/

I think there is not another service like this with such a big storage capacity.

Harris


0 Comments

    Alexis, Maria, Dimitra, Ioannis,  Michalis, Danai, Panos, George, Aspa, Zoe

    lab group members!

    Enter your email address:

    Delivered by FeedBurner

    Click to set custom HTML

    Archives

    October 2022
    December 2021
    August 2021
    July 2021
    December 2020
    November 2020
    September 2020
    August 2020
    April 2019
    September 2018
    March 2018
    January 2018
    August 2017
    February 2017
    November 2016
    July 2016
    June 2016
    January 2016
    October 2015
    May 2015
    April 2015
    January 2015
    October 2014
    September 2014
    August 2014
    June 2014
    May 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013
    October 2013
    September 2013
    August 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    February 2013
    January 2013
    December 2012
    November 2012
    October 2012
    September 2012
    August 2012
    July 2012
    May 2012
    April 2012
    March 2012
    January 2012
    October 2011

    Categories

    All
    64 Bit
    64-bit
    Academia
    Acrobat Reader
    Acroread
    Binding Sites
    Bioinformatics
    Blogging
    Career
    Chembl
    Chemdraw
    Chemistry
    Cloud Computing
    Cluster
    Compounds
    Computational Biology
    Conferences
    Courses
    Crystal Structures
    Databases
    Desktop
    Desmond
    Docking
    Drug Design
    Drug Discovery
    Education
    Email
    Excel
    Fellowships
    Ffmpeg
    Figures
    File Conversions
    Firefox
    Force Field Parameterization
    Fp7
    Free Storage Space
    Glide
    Gpu
    Grant Writing
    Gromacs
    Hpc
    Industry
    Intermolecular Interactions
    Ip Address
    Iphone
    Iso Image
    Jobs
    Library
    Linux
    Lipids
    Literature
    Maestro
    Management
    MAPS
    Materials
    Matlab
    Md Simulations
    Membrane
    Mobile Apps
    Modeling
    Namd
    Network
    Nobel Prize
    Normal Mode Analysis
    Nvidia
    Nwchem
    Off-target Effects
    Pdb
    Pdf
    Peptides
    Photoshop
    Pictures
    Plots
    Postdocs
    Presentations
    Printing
    Problem After Updates
    Programming
    Protein Preparation
    Protein-protein Interactions
    Protocols
    Publishing
    Python
    References
    Review
    Rosetta
    Scheduling
    Schrodinger
    Scripting
    Sitemap
    Solubility
    Ssh
    Teaching
    Trajectory Analysis
    Ubuntu
    Van Der Waals
    Video
    Virtualbox
    Virtual Machine
    Virtual Screening
    Visualization
    Vmd
    Voice Over Ip
    Webinars
    Website
    Writing
    Xmgrace

    RSS Feed

Powered by Create your own unique website with customizable templates.