bash - Creating cron entry on server using ssh login within shell script -


i need upload file (bash script) remote sever. use scp command. after file has been copied remote server want create cron entry in crontab file on remote server. however, file upload , writing cron entry need occur within bash shell script need execute script on local machine , script copied remote host , cron entry written crontab.

is there way can use ssh command, within script, logs me remote server, opens crontab file , writes cron entry.

any welcome

i would:

  1. extract user's crontab crontab -l > somefile
  2. modify file desired job
  3. import new crontab crontab somefile

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -