Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 TDMA scheduling help please
Hello, I was trying to implement TDMA scheduling but i dont know how to make a job sleep for certain time until some other job gets executed. For example i want job 1 to execute for 3 sec then job 2 for 3 sec then job3 for 3 secs. But the problem is job gets executed every t seconds. i want the first job to initiate again when all the jobs are finished. so i could not do it, therefore i created global i so that it switches to next job. but can someone help me do it without global 'i'.

This is the code i wrote
import schedule
import time
from datetime import datetime
global i
i = 0
def job1(i):
    print("a_CH1.append(N_message[0].pop(", str(i), ")", str(

def job2():
    #i = 0
    global i
    i = i+1

def nothing():


while 1:

Larz60+ wrote Apr-21-2020, 01:56 PM:
Please post all code, output and errors (in it's entirety) between their respective tags. I did it for you this time, Here are instructions on how to do it yourself next time.

Top Page

Forum Jump:

Users browsing this thread: 1 Guest(s)