#!/bin/bash # Run the script in the background node graphql-subscription-client.js & # Capture the process ID of the script pid=$! # Wait for 60 seconds sleep 13 # Kill the script using its process ID kill $pid