Skip to main content
The purpose of the application is to solve the problem of having a unique 'APScheduler' object for a multithreaded application. The project aims to easily implement a client-server architecture to control the scheduled processes. Another advantage is that you can use the scheduler in distributed processes or servers.

INSTALL
=======

::

$ pip install APSchedulerSocket

USAGE
=====

::

from apschedulersocket import schedulers
from datetime import datetime

def my_process():
print("Executing my process: Hello world!")

# Show the protocol messages
schedulers.DEBUG = True

# New SchedulerServer
scheduler = schedulers.SchedulerServer(daemon=False)

# Check if the server was not already started by another thread/process
if not scheduler.client.is_server_running():
scheduler.add_job(func=my_process,
id="my_process",
trigger='interval',
next_run_time=datetime.now(),
minutes=1)
# start the apscheduler and the server
print("Server started!")
scheduler.start()

print("Server state (1=running):",
scheduler.client.call(["BackgroundScheduler","state"]))

print("The next run time of my_process:",
scheduler.client.call(["my_process","next_run_time"]))

print("Pause the job:",
scheduler.client.call(["my_process","pause"]))

print("Next run time of paused my_process (None=paused):",
scheduler.client.call(["my_process","next_run_time"]))

print("Resume the job:",
scheduler.client.call(["my_process","resume"]))

print("Wrong message to server:",
scheduler.client.call(["Can you also cook?",]))

print("Shutdown!",
scheduler.client.call(["shutdown",]))


DEVELOP
=======

::

$ git clone https://github.com/rristow/APSchedulerSocket APSchedulerSocket
$ cd APSchedulerSocket
$ make

RUNNING TESTS
=============

::

$ make test
# TODO!Changelog
=========


0.1 (unreleased)
----------------

- Initial release.
[Rodrigo Ristow]
APSchedulerSocket Copyright (c) 2012, Rodrigo Ristow
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Metadata

Release files for APSchedulerSocket 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for APSchedulerSocket 0.4.2
File Size Uploaded Provenance
APSchedulerSocket-0.4.2.tar.gz 5.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for APSchedulerSocket 0.4.2
File Interpreter ABI Platform
APSchedulerSocket-0.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.4 kB

Release files / APSchedulerSocket-0.4.2.tar.gz

Download URL APSchedulerSocket-0.4.2.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9cce3e818cc7c601a5e019b7eb66a2094b4b7f3622e3aa9e4eda6019c8e399e9
BLAKE2b-256 checksum
How to use checksums
9208a13ea9a7e1823563d4f81e283e790f8bda14a2b03a268855b19ce39b2636
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

Release files / APSchedulerSocket-0.4.2-py3-none-any.whl

Download URL APSchedulerSocket-0.4.2-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0e672044004c93e8e6b4bd7611a59aa2d382c2feee1fd87781bca38a871a48a
BLAKE2b-256 checksum
How to use checksums
df844443d004c22de7a40982a2fe2d6c5c7f0334a8f9cf365d728000595c8b88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

Security for APSchedulerSocket 0.4.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page