我在做一个连续监控数据的cron工作。在cron作业函数中,有一个条件我想停止cron作业,但我不知道如何关闭cron作业。下面是我使用的函数:-
CronController.go
func AutomaticChargedCron(c *gin.Context) {
err:= //there is function which gives the value to err
if err != nil {
fmt.Println("There is something wrong please try again later.", e
我正在尝试通过从文件中读取配置来动态调度几个作业,如下所示
import (
"github.com/robfig/cron"
"fmt"
)
masterJobDetails :=// this is array of job from file
c := cron.New()
for k, v := range masterJobDetails {
fmt.Println(k, v.JobName)
c.AddFunc(v.CronExpression, v.J
我已经创建了一个Makefile文件来运行C程序在外壳script.but,我得到作为错误的fatal error: addFunc.h: No such file or directory在mainProg.c页面和addFunc.c页面。我尽我最大的努力解决这个problem.but我没有得到一个解决方案。
mainProg.c
#include <stdio.h>
#include "/home/name/Desktop/add/addFunc.h"
int main(){
int a,b;
printf("Enter two numbers\n