-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
exampleEither work on this example or submit something of your ownEither work on this example or submit something of your ownhacktoberfestHacktoberfest 2023 contributionsHacktoberfest 2023 contributionshacktoberfest-2024pythonpython-modulePython utility/resuable module, which can be imported in different scriptsPython utility/resuable module, which can be imported in different scriptspython-scriptPython utility/automation scriptPython utility/automation script
Description
Objective:
Develop a Python script that allows users to perform CRUD (Create, Read, Update, Delete) operations for cron jobs on a Linux system. This script will provide an intuitive interface to manage scheduled tasks.
Features:
-
Add New Cron Job:
- Implement functionality to add a new cron job with a specified schedule and command.
-
List Existing Cron Jobs:
- Allow users to view a list of currently scheduled cron jobs.
-
Edit Existing Cron Job:
- Provide the ability to modify the schedule or command of an existing cron job.
-
Remove Cron Job:
- Enable users to delete a specific cron job based on its ID or schedule.
Example Usage:
# Example usage of the cron job management script
import cron_manager
# Add a new cron job
cron_manager.add_job("* * * * *", "/path/to/script.py")
# List existing cron jobs
cron_manager.list_jobs()
# Edit an existing cron job
cron_manager.edit_job(1, new_schedule="0 0 * * *", new_command="/path/to/updated_script.py")
# Remove a specific cron job
cron_manager.remove_job(2)Difficulty: Intermediate/Advanced
Tags: Python, Linux, Cron Job, Task Scheduling, CRUD Operations
Additional Information:
- Familiarity with Linux and cron job scheduling is recommended for contributors interested in this task.
- Consider using libraries like
python-crontabfor interacting with the crontab in Python./ Or you can just use the subprocess/edit config file through read/write i/o operations.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
exampleEither work on this example or submit something of your ownEither work on this example or submit something of your ownhacktoberfestHacktoberfest 2023 contributionsHacktoberfest 2023 contributionshacktoberfest-2024pythonpython-modulePython utility/resuable module, which can be imported in different scriptsPython utility/resuable module, which can be imported in different scriptspython-scriptPython utility/automation scriptPython utility/automation script