PromptCron is a web application for scheduling AI prompts to be sent via email. It allows you to create and manage scheduled prompts with variable support, multiple recipients, and flexible scheduling options.
- 📅 Flexible scheduling (daily/weekly)
- 📧 Multiple email recipient support
- 🌍 Timezone selection
- 📝 Prompt templates with variable support ({{variable_name}})
- 🔍 Search and filtering capabilities
- 🎯 Form validation and error handling
- 🔔 Toast notifications
- Python 3.7+
- Node.js 14+
- npm or yarn
- SMTP server access (e.g., Gmail)
- OpenAI API key
- Clone the repository:
git clone https://github.com/yourusername/PromptCron.git
cd PromptCron- Run the setup script:
chmod +x setup.sh
./setup.shThe setup script will:
- Install system dependencies
- Set up Python virtual environment
- Install backend dependencies
- Install frontend dependencies
- Configure nginx (if running in production)
- Create example environment files
Copy the example environment file and update it with your settings:
cp env_examples/backend.env.example backend/.envUpdate the following variables in backend/.env:
# OpenAI API Configuration
OPENAI_API_KEY=your_openai_api_key_here
# Email Configuration
SMTP_USERNAME=your_email@gmail.com
SMTP_PASSWORD=your_app_specific_password
# Server Configuration
HOST=0.0.0.0
PORT=8000
# CORS Settings (update in production)
ALLOWED_ORIGINS=http://localhost:3000
# ALLOWED_ORIGINS=http://your-domain.comCopy the example environment file and update it with your settings:
cp env_examples/frontend.env.example frontend/.envUpdate the following variables in frontend/.env:
# Development
REACT_APP_API_URL=http://localhost:8000/api
# Production (uncomment and update with your domain)
# REACT_APP_API_URL=http://your-domain.com/api- Start the backend server:
cd backend
source venv/bin/activate
python app.py- In a new terminal, start the frontend development server:
cd frontend
npm startThe application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000/api
Run the deployment script:
HOSTNAME="yourdomain.com / ip"
echo $HOSTNAME
chmod +x run.sh
./run.shThe application will be available at:
- Frontend: http://your-domain.com
- Backend API: http://your-domain.com/api
-
Creating a Schedule
- Click "New Schedule" button
- Enter recipient email(s)
- Create your prompt template with variables using {{variable_name}} syntax
- Set schedule type (daily/weekly)
- Select time and timezone
- Add variables and their values
- Save the schedule
-
Managing Schedules
- View all schedules in the main dashboard
- Search schedules by email or title
- Sort schedules by title
- Delete schedules as needed
-
Port 3000 Already in Use
- Accept the prompt to use a different port
- Or kill the existing process and restart
-
Email Not Sending
- Verify SMTP credentials in backend/.env
- For Gmail, ensure "Less secure app access" is enabled or use App Password
-
CORS Issues
- Check ALLOWED_ORIGINS in backend/.env matches your frontend URL
- Ensure both frontend and backend are running
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.