Industrial Processes Automation and Energy saving using Scheduling Algorithm for Industry 4.0