code: def sources(scheduled=False):
      '''List all harvest sources'''
      sources = actions.list_sources()
      if scheduled:
          sources = [s for s in sources if s.periodic_task]
      if sources:
          for source in sources:
              msg = '{source.name} ({source.backend}): {cron}'
              if source.periodic_task:
                  cron = source.periodic_task.schedule_display
              else:
                  cron = 'not scheduled'
              log.info(msg.format(source=source, cron=cron))
      elif scheduled:
          log.info('No sources scheduled yet')
      else:
          log.info('No sources defined yet'f sources(scheduled=False):
      '''List all harvest sources'''
      sources = actions.list_sources()
      if scheduled:
          sources = [s for s in sources if s.periodic_task]
      if sources:
          for source in sources:
              msg = '{source.name} ({source.backend}): {cron}'
              if source.periodic_task:
                  cron = source.periodic_task.schedule_display
              else:
                  cron = 'not scheduled'
              log.info(msg.format(source=source, cron=cron))
      elif scheduled:
          log.info('No sources scheduled yet')
      else:
          log.info('No sources defined yet')
docs: List all harvest sources