Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8694719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:51:06+00:00 2026-06-13T00:51:06+00:00

I have a python code that generates the command to record a live stream

  • 0

I have a python code that generates the command to record a live stream from Ustream.

I want to set a cronjob to run this script once a week to record a show, is there a code I could use in the python code so that after generating the right command it’s executed for a given time and then stop it?

I guess there should be a way to run the script, wait the desire time and then just kill the process using it’s ID. Is that correct?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:51:07+00:00Added an answer on June 13, 2026 at 12:51 am

    You could have the started process write its process ID to a file when it starts up. Then make another cron job that reads that file and kills the process ID in that file.

    You could alternatively (rather than modifying the started process) make a ‘starter’ bash script which writes the started process’s ID to a file:

    #!/bin/bash -e
    nohup python ustream_recorder.py > /tmp/ustream_recorder.log 2>&1 &
    echo $! > /tmp/ustream_recorder.pid
    

    Then, to kill it:

    #!/bin/bash -e
    kill -INT `cat /tmp/ustream_recorder.pid`
    rm /tmp/ustream_recorder.pid
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a C++ code generator in Python that generates many source files. Most
We have an older C++ tool that generates some python code automatically. I tried
I have a piece of C++ code that generates the data. I want to
I have some python code which generates a 256^3 numpy array of data that
I have the following python code that generates a list of anonymous functions: basis
I have a shell script that I want to call from a python program,
I have a python script, that generates kml files. Now I want to upload
I have some python code that I wrote to convert a python list into
I have some python code that currently performs expensive computation by performing the computation
I have a piece of Python code that is supposed to open a new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.